title: Is there a way to detect changes in a folder using php on both windows and linux?
body: <p>I'm looking for a solution to detect changes in folder(s) using <strong>php</strong>. The application may run on both platforms(<em>linux</em> and <em>windows</em>). I may use different methods for each platform as long as results are the same. 
  What I desire is :</p>
  
  <ol>
  <li>If a file/folder is added to a directory, I want my app to detect this new file and read its attributes (<code>size,filetime</code> etc)</li>
  <li>If a existing file/folder is saved/contents changed/deleted, I need to detect this file is changed</li>
  <li>It would be better if I can monitor a base folder outside webroot of <em>apache</em> (such as <code>c:\tmp</code>, or <code>d:\music</code> on windows or <code>/home/ertunc</code> on linux)</li>
  </ol>
  
  <p>I read something on <code>inotify</code> but I'm not sure it meets my needs.</p>