Monitoring folders for changes

Posted by blcArmadillo on Stack Overflow See other posts from Stack Overflow or by blcArmadillo
Published on 2011-01-31T06:53:02Z Indexed on 2011/01/31 7:25 UTC
Read the original article Hit count: 326

I'm working on a project that will require an application that watches a list of directories the user specifies for changes. Also, I'd like to give the users the option of running the application as a service or on an individual basis. Since users can choose to run it on an individual basis I don't think listening for some operating system event triggered by the addition or deletion of files (if such events exist) would be sufficient. I thought about maybe calculating a checksum for the deepest folder and then building up. I could then compare these checksums on subsequent scans to try and pinpoint where the changes have occurred. Would that be an appropriate solution; if not what would be the best way of doing this in an efficient manner?

Also, I'm not quite sure what to tag this as so if you have any recommendations let me know and I'll as them as I see fit.

EDIT: I'll need this method to work on Windows, OS X, and ideally Linux

© Stack Overflow or respective owner

Related posts about filesystems

Related posts about operating-system