Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

mrsoft.util
Class DirectoryLoader  view DirectoryLoader download DirectoryLoader.java

java.lang.Object
  extended bymrsoft.util.DirectoryLoader

public class DirectoryLoader
extends java.lang.Object


Field Summary
(package private)  boolean branch
           
(package private)  int countfiles
           
(package private)  java.lang.String extension
           
(package private)  java.util.Vector files
           
(package private)  boolean force_stop
           
(package private)  boolean incl_dir
           
(package private)  boolean incl_files
           
(package private)  java.util.Vector listeners
           
(package private)  int sumlength
           
(package private)  boolean verbose
           
 
Constructor Summary
DirectoryLoader()
           
 
Method Summary
 void addDirectoryLoaderListener(DirectoryLoaderListener l)
          Adds a listener that gets notified of progress on traversing the directory and file structure
 void clean()
          Cleans up this object.
 void forceStop()
          Forces the search for files to stop
 int getCount()
          Returns the number of files currently found
 java.util.Vector getFiles()
          Returns the vector with files that was loaded
 int getLength()
          Returns the sum of the lengths of the files currently found.
 void includeDirectories(boolean state)
           
 void includeFiles(boolean state)
           
 java.util.Vector load(java.lang.String start_dir)
          Starts the procedure.
protected  void newDirectory(java.io.File file)
           
protected  void newFile(java.io.File file)
           
 void removeDirectoryLoaderListener(DirectoryLoaderListener l)
          Removes the listener
 void setBranch(boolean state)
           
 void setExtension(java.lang.String value)
           
 void setVerbose(boolean state)
           
 boolean test(java.lang.String file)
          Tests if the file should be included in the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

files

java.util.Vector files

sumlength

int sumlength

countfiles

int countfiles

force_stop

boolean force_stop

extension

java.lang.String extension

branch

boolean branch

verbose

boolean verbose

incl_dir

boolean incl_dir

incl_files

boolean incl_files

listeners

java.util.Vector listeners
Constructor Detail

DirectoryLoader

public DirectoryLoader()
Method Detail

setExtension

public void setExtension(java.lang.String value)

setVerbose

public void setVerbose(boolean state)

setBranch

public void setBranch(boolean state)

includeDirectories

public void includeDirectories(boolean state)

includeFiles

public void includeFiles(boolean state)

getCount

public int getCount()
Returns the number of files currently found


getLength

public int getLength()
Returns the sum of the lengths of the files currently found.


getFiles

public java.util.Vector getFiles()
Returns the vector with files that was loaded


forceStop

public void forceStop()
Forces the search for files to stop


addDirectoryLoaderListener

public void addDirectoryLoaderListener(DirectoryLoaderListener l)
Adds a listener that gets notified of progress on traversing the directory and file structure


removeDirectoryLoaderListener

public void removeDirectoryLoaderListener(DirectoryLoaderListener l)
Removes the listener


load

public java.util.Vector load(java.lang.String start_dir)
Starts the procedure. start_dir is the directory where the search starts.
Returns the vector with files that belongs to this object, and might contain results from previous searches.


clean

public void clean()
Cleans up this object.


newDirectory

protected void newDirectory(java.io.File file)

newFile

protected void newFile(java.io.File file)

test

public boolean test(java.lang.String file)
Tests if the file should be included in the list.