Question

For my application I need to keep track of all files that are touched using the OS (Windows or Mac). By touching I'm talking about opening files or saving files. Is this possible at all? And if yes, what keywords should I google?

Was it helpful?

Solution

Apache commons io library, if you want to use with Java 6.*

extending more: On a second look here is question in SO { Is there a sophisticated file system monitor for Java which is freeware or open source? } It may be the one Roflcoptr is interested. It talks about http://jnotify.sourceforge.net/. I did not use that for getting info on reading, though.

OTHER TIPS

Java 7 has some features for that - Watching a directory for changes - API

Here is a blog regarding the same Watching a directory for changes

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top