|
foundry-0.9.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--foundry.io.FileFinder
A class that finds files in a filesystem.
File
Field Summary | |
private Set |
files
The Set of files that were found. |
private File |
startingPoint
The directory from which to conduct the search. |
Constructor Summary | |
FileFinder()
Creates a new FileFinder whose search will begin
from the current directory. |
|
FileFinder(File startingPoint)
Creates a new FileFinder whose search will begin from the
supplied directory. |
|
FileFinder(File startingPoint,
Set files)
Creates a new FileFinder whose search will begin
from the supplied directory, and whose results will be placed in
the supplied Set . |
|
FileFinder(String startingPoint)
Creates a new FileFinder whose search will begin
from the directory identified by the supplied path. |
|
FileFinder(String startingPoint,
Set files)
Creates a new FileFinder whose search will begin
from the directory identified by the supplied path, and whose
results will be placed in the supplied Set . |
Method Summary | |
Set |
getFiles()
Returns the results of a previously started search. |
private void |
init(File startingPoint,
Set files)
Initializes this FileFinder . |
static void |
main(String[] args)
Creates a new FileFinder and starts a search,
ultimately printing out each file's full path. |
void |
run()
Causes this FileFinder to begin its search. |
void |
start()
Causes this FileFinder to begin its search. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private File startingPoint
private Set files
Set
of files that were found.Constructor Detail |
public FileFinder()
FileFinder
whose search will begin
from the current directory.public FileFinder(File startingPoint)
FileFinder
whose search will begin from the
supplied directory.startingPoint
- the directory from which the search will beginpublic FileFinder(String startingPoint)
FileFinder
whose search will begin
from the directory identified by the supplied path.startingPoint
- the path of the directory from which the
search will beginpublic FileFinder(File startingPoint, Set files)
FileFinder
whose search will begin
from the supplied directory, and whose results will be placed in
the supplied Set
.startingPoint
- the directory from which the search will beginfiles
- the Set
into which the results of the search
will be placed; each element will be a File
public FileFinder(String startingPoint, Set files)
FileFinder
whose search will begin
from the directory identified by the supplied path, and whose
results will be placed in the supplied Set
.startingPoint
- the path of the directory from which the
search will beginfiles
- the Set
into which the results of the search
will be placed; each element will be a File
Method Detail |
private void init(File startingPoint, Set files)
FileFinder
.startingPoint
- the directory from which the search will
begin; if null
, the current directory will be used
insteadfiles
- the Set
into which the results of the search
will be placed; each element will be a File
public void start()
FileFinder
to begin its search.public void run()
FileFinder
to begin its search.run
in interface Runnable
public Set getFiles()
Set
public static void main(String[] args) throws Exception
FileFinder
and starts a search,
ultimately printing out each file's full path. The first element
in the supplied args
parameter is taken to be the
path to a directory from which to begin the search. If
args
is null
, or has no elements, then
the search will occur from the current directory.args
- the command line arguments; the first element is
taken to be the path to a directory from which to begin the
searchException
- if an unexpected error occurs
|
foundry-0.9.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |