xbn.util
Class DirScan

java.lang.Object
  |
  +--xbn.XBNObject
        |
        +--xbn.util.DirScan

public class DirScan
extends XBNObject

Retrive the paths to all files/dirs contained in a directory. The configuration for DirScan is held by DSConfig

Source code:  DirScan.java.  Example code  XmplDirScan.java.

Since:
0.8.2b

Fields inherited from class xbn.XBNObject
bFALSE_IN_PRODUCTION, bTRUE_IN_PRODUCTION, sCNSTR, sES, sLINE_SEP
 
Constructor Summary
DirScan(String s_baseDir)
          Create a DirScan.
DirScan(String s_baseDir, DSConfig ds_config)
          Create a DirScan.
 
Method Summary
 String getBaseDir()
          Get the base directory.
 DSConfig getDSConfig()
          Get the DSConfig for direct manipulation.
 Vector getVector()
          Get the paths of all the files and directories analyzed for.
 String toString()
          Get some information about this DirScan.
 
Methods inherited from class xbn.XBNObject
getXMsgPrefix, sop, sopl, sopl, throwAX, throwAXIfBadStr, throwAXIfNull, throwAXSpoof
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DirScan

public DirScan(String s_baseDir)

Create a DirScan.

Equal to DirScan(s_baseDir, (new DSConfig()))


DirScan

public DirScan(String s_baseDir,
               DSConfig ds_config)

Create a DirScan.

Notes

Parameters:
s_baseDir - The base directory to be scanned. May not be null, must point to a directory, and that directory must exist.
ds_config - Configuration for this scan. May not be null.
Method Detail

getVector

public final Vector getVector()

Get the paths of all the files and directories analyzed for.

It is not efficient to call this repeatedly.

Returns:
A Vector containing zero or more string elements (the base directory is not included), each representing a directory or file contained in the base directory.

getBaseDir

public final String getBaseDir()

Get the base directory.

Returns:
s_baseDir exactly as provided to the constructor.

getDSConfig

public final DSConfig getDSConfig()

Get the DSConfig for direct manipulation.

Returns:
ds_config exactly as provided to the constructor.

toString

public final String toString()

Get some information about this DirScan.

Overrides:
toString in class Object



Copyright 1997-2003, Jeff Epstein, All Rights Reserved. See top of source code files for copyright notice.

 

http://sourceforge.net/projects/xbnjava

 

SourceForge.net Logo