It’s possible to listen folders and files changes (by events) on PHP or Node directly, or I need make my own method to do it?
Example: I need to listen the folder /user. If I add some file into this directory the PHP or Node receives the information and run PathEvent::fileAdded("/user/user.profile") for instance. If I rename a folder it run PathEvent::pathRenamed("/user/save1", "/user/save2").
I know that PHP don’t have an event system like Node. But for PHP I can, for instance, run a method (that I don’t know currently) that have the changes ocurred since last time checked.
Well… I need only a way to start searching, I don’t know exactly what is the term of this search. If you can show me an example, it’ll be great too! 😛
Node.js provides this functionality. You can read bout this here.
Simple example:
Note: