| View previous topic :: View next topic |
| Author |
Message |
Jesse Glick Posted via mailing list.
|
Posted: Thu Oct 29, 2009 8:02 pm Post subject: Re: FileChangeListener and listen to changes on Physical File System |
|
|
Gonzalo Tirapegui Medina wrote:
| Quote: | FileUtil.addFileChangeListener(new MyListener(), tempFile);
i understand this function listen to the PHYSICAL files and directory
changes (renaming , deleting , adding a new File) and notify to the
implementation of FileChangeListener to execute the corresponding code ,
but it doesn't work for me
|
1. The above should work on individual files, but if you wish to use one listener to check for changes anywhere beneath a file tree, you will need
addRecursiveFileChangeListener in 6.8.
2. You will not be notified if changes on disk (using java.io.File methods, or out-of-process changes) unless there is some trigger causing NetBeans to look for them. See
#26230 for a request for native-backed polling.
Anyway I wonder what it is you're trying to accomplish. If you have a physical file tree, you can treat it as a FileObject tree just using FileUtil.toFileObject. If you
want to treat it as read-only but have memory-backed changes as an overlay, use MultiFileSystem with FileUtil.createMemoryFileSystem. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
|
|