Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ifs.utils.io
Class ListDirectory

    java.lang.Object
      oracle.ifs.utils.io.ListDirectory

All Implemented Interfaces:
  DirectoryItemHandler

    public class ListDirectory

extends java.lang.Object
implements DirectoryItemHandler

The class `ListDirectory` lists the contents of a directory tree in the local filesystem.

Modified:
  dlong 01/25/2005 change handleItem to return boolean, lsaenz 12/04/1999 Updated comments., lsaenz 11/22/1999 Created.

Constructor Summary
`ListDirectory()`

Method Summary
`boolean` | `handleItem(java.io.File f, int howDeep)` Defines `DirectoryItemHandler`.
`void` | `ls(java.lang.String dir, boolean recurse)` Lists the contents of a directory, optionally listing the contents of every subdirectory recursivley.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ListDirectory

    public ListDirectory()

Method Detail

### ls

    public void ls(java.lang.String dir,
                   boolean recurse)

  Description copied from class: `ListDirectory`
  Lists the contents of a directory, optionally listing the contents of every subdirectory recursivley.

  Parameters:
    `dir` - the directory to list
    `recurse` - whether or not to list the contents of every subdirectory recursively.

### handleItem

    public boolean handleItem(java.io.File f,
                              int howDeep)

  Description copied from class: `ListDirectory`
  Defines `DirectoryItemHandler`.
  Prints the name of the current File to `System.out`. Uses indenting to show the level of the traversal.

  Specified by:
    `handleItem` in interface `DirectoryItemHandler`
  Parameters:
    `f` - the current File being handled by `DirectoryTree.traverse`.
    `howDeep` - how "deep" the traversal is in the tree, with respect to the root folder in the local filesystem. (i.e., if the current file is: `/foo/bar/a/b/x.txt` and the root of the traversal was specified as `/foo/bar`, then `howDeep == 2`.)
  Returns:
    true if the traversal is free to continue; false if it shoul dbe short-circuited

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD