|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gentlyweb.utils.FileWatcher
public class FileWatcher
Nested Class Summary | |
---|---|
protected class |
FileWatcher.Worker
|
Constructor Summary | |
---|---|
FileWatcher()
|
Method Summary | |
---|---|
void |
addAll(java.io.File dir,
java.io.FileFilter ff)
Add all the files in the specified directory. |
void |
addFile(java.io.File f)
Add a file to be watched. |
void |
addFileChangeListener(FileChangeListener f)
|
void |
addFileChangeListener(FileChangeListener f,
int changeTypes)
|
void |
clearAll()
Stop ALL files from being watched. |
protected void |
fireFileChange(java.io.File file,
FileChangeEvent event,
int types)
|
protected java.util.Map |
getFiles()
|
void |
removeAll(java.io.File dir)
Remove all the files that we are watching that have the specified directory as given by the passed in File. |
void |
removeAll(java.io.FileFilter ff)
Remove all the files from our list of watched files according to the FileFilter passed in. |
void |
removeFile(java.io.File f)
Stop a file being watched. |
void |
removeFileChangeListener(FileChangeListener f)
|
void |
setCheckRepeatTime(long millis)
|
protected void |
setFileDetails(java.io.File f,
FileDetails fd)
|
void |
start()
|
void |
stop()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileWatcher()
Method Detail |
---|
public void addFile(java.io.File f)
f
- The file to add.public void removeFile(java.io.File f)
f
- The file to remove.public void clearAll()
public void addAll(java.io.File dir, java.io.FileFilter ff)
dir
- The directory.ff
- The FileFilter to use to determine which files to accept/reject.public void removeAll(java.io.File dir)
dir
- The parent directory of files that we want to remove.public void removeAll(java.io.FileFilter ff)
ff
- The FileFilter to determine what should be removed.protected java.util.Map getFiles()
protected void setFileDetails(java.io.File f, FileDetails fd)
public void setCheckRepeatTime(long millis)
public void start()
public void stop()
protected void fireFileChange(java.io.File file, FileChangeEvent event, int types)
public void removeFileChangeListener(FileChangeListener f)
public void addFileChangeListener(FileChangeListener f, int changeTypes)
public void addFileChangeListener(FileChangeListener f)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |