FeaturesPluginsDocs & SupportCommunityPartners

NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Re: FileChangeListener and listen to changes on Physical File System

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Developers
View previous topic :: View next topic  
Author Message
Jesse Glick
Posted via mailing list.





PostPosted: Thu Oct 29, 2009 8:02 pm    Post subject: Re: FileChangeListener and listen to changes on Physical File System Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Developers All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB