All Packages Class Hierarchy This Package Previous Next Index
Class buildtools.FileChangeMonitor
java.lang.Object
|
+----buildtools.FileChangeMonitor
- public class FileChangeMonitor
- extends 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 $
- Author:
- Kevin A. Burton
-
directory
-
-
extensions
-
-
files
- A list of files and their modification times.
-
FileChangeMonitor(String, String[])
- Looks at the given directory and all files underneath only matching the
given extensions.
-
check()
- Checks the new modification times of registered files.
-
getAllFiles()
- Returns all files that are being monitored.
-
getChangedFiles()
- Returns the files that have been changed for this monitor.
files
private Hashtable files
- A list of files and their modification times. The
directory
private String directory
extensions
private String extensions[]
FileChangeMonitor
public FileChangeMonitor(String directory,
String extensions[])
- Looks at the given directory and all files underneath only matching the
given extensions.
getChangedFiles
public String[] getChangedFiles()
- Returns the files that have been changed for this monitor.
getAllFiles
public 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.
All Packages Class Hierarchy This Package Previous Next Index