/**
- * @author jim Watches a particular file for its creation, deletion, or
- * modification.
+ * Watches a particular file for its creation, deletion, or
+ * modification. The watcher is thread safe and different
+ * instances watching the state of a particular file carry
+ * their own state record for the file.
*/
public class FileWatcher {
subjectLock=null;
}
/**
- *
+ *
* @return true if subject exists and is locked by another process.
*/
private boolean checkLock() {
}
subjectLock = new Lock(subject);
if (subjectLock.isLocked()) {
- // subjectLock.release();
return false;
}
clearLock();
*/
public FileWatcher(File subject) {
- // TODO Auto-generated constructor stub
this.subject = subject;
setState();
}