photospace.vfs.event
Class FileSystemWatcher

java.lang.Object
  extended byphotospace.vfs.event.FileSystemWatcher
All Implemented Interfaces:
java.lang.Runnable

public class FileSystemWatcher
extends java.lang.Object
implements java.lang.Runnable


Constructor Summary
FileSystemWatcher()
           
 
Method Summary
 void addListener(FileEventListener listener)
           
 void addRoot(java.io.File file)
           
 java.util.Map createSnapshot(java.io.File[] roots)
          Creates a snapshot of the files in the provided file system roots.
 void destroy()
           
 java.util.Map getSnapshot()
           
 void run()
           
 void setFilter(java.io.FileFilter filter)
           
 void setListeners(java.util.List listeners)
           
 void setRoots(java.util.List roots)
           
 void setSleep(int sleep)
           
 void start()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSystemWatcher

public FileSystemWatcher()
Method Detail

addListener

public void addListener(FileEventListener listener)
                 throws java.io.IOException
Throws:
java.io.IOException

addRoot

public void addRoot(java.io.File file)
             throws java.io.IOException
Throws:
java.io.IOException

setRoots

public void setRoots(java.util.List roots)
              throws java.io.IOException
Throws:
java.io.IOException

setListeners

public void setListeners(java.util.List listeners)
                  throws java.io.IOException
Throws:
java.io.IOException

setFilter

public void setFilter(java.io.FileFilter filter)

start

public void start()

destroy

public void destroy()

run

public void run()
Specified by:
run in interface java.lang.Runnable

createSnapshot

public java.util.Map createSnapshot(java.io.File[] roots)
Creates a snapshot of the files in the provided file system roots. The snapshot is a Map of File objects to their lastModified date as of the time the snapshot was taken.

Parameters:
roots -
Returns:

setSleep

public void setSleep(int sleep)

getSnapshot

public java.util.Map getSnapshot()