This commit is contained in:
Ziver Koc 2008-11-14 16:38:36 +00:00
commit 613bef2496
108 changed files with 8397 additions and 0 deletions

View file

@ -0,0 +1,29 @@
package zutil.test;
import java.io.File;
import java.io.FileNotFoundException;
import java.net.URISyntaxException;
import zutil.FileChangeListener;
import zutil.FileFinder;
import zutil.FileWatcher;
public class FileChangedTest implements FileChangeListener{
public static void main(String[] args) throws URISyntaxException, FileNotFoundException{
FileWatcher watcher = new FileWatcher(FileFinder.find("test.txt"));
watcher.setListener(new FileChangedTest());
while(true){
try {
Thread.sleep(10);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
public void fileChangedEvent(File file) {
System.out.println(file);
}
}