I'm looking for a solution to detect changes in folder(s) using php. The application may run on both platforms(linux and windows). I may use different methods for each platform as long as results are the same. What I desire is :
size,filetime
etc)c:\tmp
, or d:\music
on windows or /home/ertunc
on linux)I read something on inotify
but I'm not sure it meets my needs.
Monitoring the filesystem for changes is a task that should be solved outside PHP. It's not really built to do stuff like this.
There are ready-made tools on both platforms that can monitor file changes that could call a PHP file to do the further processing.
For Linux:
For Windows: