dcsimg
A file/directory listener
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Thomas_Rosenbaum
Posted On:   Wednesday, December 5, 2001 06:41 AM

What is the best way to implement a 'fileListener'?

I am trying to implement 'listening' to a properties file within a given URL and automatically reloading it upon modification. Of course I am familiar with the File.lastModified() method and somewhat familiar with the Swing eventListeners, but I'm not aware of any 'fileListener' API.

Does anyone have any suggestions?

Re: A file/directory listener

Posted By:   Bozidar_Dangubic  
Posted On:   Wednesday, December 5, 2001 07:44 AM

there is no file listener but you can implement a thread that sits and periodically checks the file for modifications using the method you mentioned above. if it encounters a change, it can invoke a method on some other object to reload the properties for you.
About | Sitemap | Contact