public class FileSearcher extends Object
Constructor and Description |
---|
FileSearcher() |
Modifier and Type | Method and Description |
---|---|
File |
searchFile(String rootS,
String fileName)
Recursively search a file in a directory given the filename.
|
public File searchFile(String rootS, String fileName)
SearchFile searcher = new SearchFile();
File f = searcher.searchFile(".", "index.html");
System.out.println(f.getAbsolutePath());.
rootS
- the root directory to start the searchfileName
- the name of the file to searchCopyright © 2016. All rights reserved.