anon
anon

Reputation:

Java: Keep track of files that are touched in the OS

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?

Upvotes: 1

Views: 418

Answers (2)

Jayan
Jayan

Reputation: 18459

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.

Upvotes: 2

Vino
Vino

Reputation: 1544

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

Upvotes: 4

Related Questions