Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Monitering a file

 
Kevin Fonner
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What would be an effient way to moniter if a file is changed? Also a way to moniter if the contents of a directory or it's subdirectories change?
 
jason adam
Chicken Farmer ()
Ranch Hand
Posts: 1932
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Create a thread that loops every so many seconds (or however long you are interested), and use the lastModified() method in the File class to check if it's changed. Simplest way I can think of.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!