anecho.util
Class FileUtils

java.lang.Object
  extended by anecho.util.FileUtils

public class FileUtils
extends java.lang.Object

This class contains some basic file utilities such as recursive directory listings.


Constructor Summary
FileUtils(java.lang.String inputName)
          Creates a new instance of FileUtils
 
Method Summary
 java.lang.String[] recursiveList(boolean includeDirs)
          This method will creative a recursive list of file names.
 void setFile(java.lang.String inputName)
          Set the file or path to operate on.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileUtils

public FileUtils(java.lang.String inputName)
Creates a new instance of FileUtils

Parameters:
inputName - The file or path name to perform a function on.
Method Detail

setFile

public void setFile(java.lang.String inputName)
Set the file or path to operate on.

Parameters:
inputName - A string representing the file name or path

recursiveList

public java.lang.String[] recursiveList(boolean includeDirs)
                                 throws java.lang.Exception
This method will creative a recursive list of file names. If includeDirs is true, we will include the directories, otherwise the list will only contain files

Parameters:
includeDirs - true - include the directory as a separate entity in the return list
Returns:
A list of entities with represent all the files (and optionally directories) found recursively from our starting point.
Throws:
java.lang.Exception - An exception will be thrown if the user specifies a file instead of a directory