import java.io.File;
-
/**
- *
- *
+ *
+ *
* @author Erik Brakkee
*/
public class DirectoryMonitorTestProgram {
public static void main(String[] aArgs) throws Exception {
DirectoryMonitor monitor = new DirectoryMonitor(new File("."),
- new AwkFilenameFilter(".*\\.txt"),
- new DirectoryMonitor.Listener() {
- public void fileChanged(File aFile) {
- System.out.println("changed " + aFile);
- }
+ new AwkFilenameFilter(".*\\.txt"), new DirectoryMonitor.Listener() {
+ public void fileChanged(File aFile) {
+ System.out.println("changed " + aFile);
+ }
- public void fileCreated(File aFile) {
- System.out.println("created " + aFile);
- }
+ public void fileCreated(File aFile) {
+ System.out.println("created " + aFile);
+ }
- public void fileDeleted(File aFile) {
- System.out.println("deleted " + aFile);
- }
- });
+ public void fileDeleted(File aFile) {
+ System.out.println("deleted " + aFile);
+ }
+ });
for (;;) {
monitor.poll();