buildtools
Class FileChangeMonitor

java.lang.Object
buildtools.FileChangeMonitor
- public class FileChangeMonitor
- extends java.lang.Object
Provides a way to determine if files in a directory have changed.
- Version:
- $Id: FileChangeMonitor.java,v 1.2 1999/12/12 17:53:27 burton Exp $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
files
private java.util.Hashtable files
- A list of files and their modification times. The
directory
private java.lang.String directory
extensions
private java.lang.String[] extensions
FileChangeMonitor
public FileChangeMonitor(java.lang.String directory,
java.lang.String[] extensions)
- Looks at the given directory and all files underneath only matching the
given extensions.
getChangedFiles
public java.lang.String[] getChangedFiles()
- Returns the files that have been changed for this monitor.
getAllFiles
public java.lang.String[] getAllFiles()
- Returns all files that are being monitored.
check
public void check()
- Checks the new modification times of registered files. And sets their
modification time to their new value. If any files were deleted, they are
removed from the list, if any files are created, they are added to the list.