Read last modification time for a given directory

cabrera48
cabrera48 used Ask the Experts™
on
Is it possible to read the last modification for a given directory using PHP? Last modification meaning the last time a file changed or a file was added or deleted inside a given directory. Please let me know, thanks.

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
$last_mod_time = filemtime("/path/dir/.");

you need the dot at the end to read the directoy as a file

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial