I want to perform some operation after a file named (XXXXXX.txt) created in the specific directory. I just don't want to monitor the whole directory. How can i achieve this using Apache Commons VFS API? I tried with the below code, but it did not work out. Any idea about how to achieve this?
FileObject listendir1 = fsManager.resolveFile("C:\\Users\\Myname\\AppData\\Local\\Temp\\XXXXXXX.txt");
fileMonitor.addFile(listendir1);
fileMonitor.start();