GigaSpaces XAP 10.0.1 API

com.sun.jini.system
Class FileWalker

java.lang.Object
  extended by java.util.Observable
      extended by com.sun.jini.system.FileWalker

public class FileWalker
extends Observable

Class to recursively traverse a given directory. Each time a file is found the Observer object added to this one will be called.

Author:
Sun Microsystems, Inc.

Constructor Summary
FileWalker()
           
 
Method Summary
 void walk(File file, boolean includeDirectories)
          Method to call that starts the directory traversal.
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileWalker

public FileWalker()
Method Detail

walk

public void walk(File file,
                 boolean includeDirectories)
Method to call that starts the directory traversal. Make sure that a FileObserver has been added prior to invoking this method.

Parameters:
file - The top of the directory to traverse.
includeDirectories - If true it will recursively traverse the given directory. If false, just do the files currently found in the given directory.
See Also:
Observable, Observer, FileObserver

GigaSpaces XAP 10.0.1 API

Copyright © GigaSpaces.