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

Variable Index

 o directory
 o extensions
 o files
A list of files and their modification times.

Constructor Index

 o FileChangeMonitor(String, String[])
Looks at the given directory and all files underneath only matching the given extensions.

Method Index

 o check()
Checks the new modification times of registered files.
 o getAllFiles()
Returns all files that are being monitored.
 o getChangedFiles()
Returns the files that have been changed for this monitor.

Variables

 o files
 private Hashtable files
A list of files and their modification times. The

 o directory
 private String directory
 o extensions
 private String extensions[]

Constructors

 o FileChangeMonitor
 public FileChangeMonitor(String directory,
                          String extensions[])
Looks at the given directory and all files underneath only matching the given extensions.

Methods

 o getChangedFiles
 public String[] getChangedFiles()
Returns the files that have been changed for this monitor.

 o getAllFiles
 public String[] getAllFiles()
Returns all files that are being monitored.

 o 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