Hi Carlos,

  Directories are just normal files thus they have "Last Modified" and "Last
Changed" time stamps. So the quickest and easiest way is to check these
times periodically and if any of them has changed then there was some
activity other than reading in the directory. You can get the timestamps
using stat() function.

Regards,

Peter

"Carlos Fernando Scheidecker Antunes" <[EMAIL PROTECTED]> wrote in
message 003301c2c4df$d3fa42e0$9d505ad1@Nando0">news:003301c2c4df$d3fa42e0$9d505ad1@Nando0...
I would like to write a function to check if the contents of a directory,
its files, have been changed.
The idea is to check the directory every 2 minutes and take some actions if
some files were updated
or new files added.

Does anyone has any ideas?

I was considering listing the files (name, date modified, size) on a
variable array, then list again and compare both arrays. In case there are
different, take some action.

Thank you,

C.F.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to