I have a simple file monitor setup that watches one file so I get notified when the contents of that file changes, added, or deleted. But when the file gets deleted I never get notified when it gets added back. Here is a snippet of my code:
String properyPath = "/some/directory/somexml.xml";
FileSystemManager fsManager;
fsManager = VFS.getManager();
FileObject listendir = fsManager.resolveFile( propertyPath );
DefaultFileMonitor fm = new DefaultFileMonitor( this );
fm.setRecursive( true );
fm.addFile( listendir );
fm.start();
When the propertyPath file gets deleted I get notified in my fileDeleted implementation, but the fileAdded method never gets called when I recreate the file again. Is this normal? If so, how do I set it up to get notified on adds after a delete?