Is it possible to somehow create a virtual folder with Java, and hook a bunch of events to it (for example whenever another program tries to fetch a list of files inside the folder, or tries to read a file?)
I don’t think so, and I’ve googled for quite a while but this question has been on my mind for a long time and maybe I’m just not using the right keywords.
Java 7 has a so called WatchService for directories/files.
http://download.oracle.com/javase/7/docs/api/java/nio/file/package-summary.html