firatkalyoncu
New Member
I'm using commons VFS to monitor certain folder for changes (mainly inserting new file), the program should runs permanently, I use the following code\[code\]FileSystemManager fsManager = VFS.getManager();FileObject listendir = fsManager.resolveFile(path);DefaultFileMonitor fm = new DefaultFileMonitor(new VfsListener());fm.setRecursive(true);fm.addFile(listendir);fm.start();\[/code\]where path is the folder path, and VfsListener is a class that implements FileListener, when I run the program it runs and then closed immediately, when I added this after fm.start() :\[code\]Thread.sleep(100000)\[/code\]the program run for a while and then closed after the time out is reached, and I don't want that, I want the program to rum permanently, if anyone know please reply