net.groboclown.util.io.v1
Class FileUtils
java.lang.Object
|
+--net.groboclown.util.io.v1.FileUtils
- public class FileUtils
- extends Object
- Version:
- 0.9.0 Alpha
- Author:
- Matt Albrecht
Constructor Summary |
protected |
FileUtils()
Default Constructor |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
s_instance
protected static FileUtils s_instance
FileUtils
protected FileUtils()
- Default Constructor
getInstance
public static FileUtils getInstance()
copyFileToDirectory
public void copyFileToDirectory(File source,
File dir)
throws IOException
- Parameters:
source
- the source file to copydir
- the target directory to copy the sourcefile into: the
name will remain the same.
copyFileToFile
public void copyFileToFile(File source,
File target)
throws IOException
- Parameters:
source
- the source file to copy from.target
- the target file to copy to.
findFileRecurse
public File[] findFileRecurse(File baseDir,
FilenameFilter filter)
- Recursively descends into the base directory, looking for all files
that pass the filter.
- Parameters:
baseDir
- the base directory to start the search.filter
- the filename filter to search. If null, then
all files are allowed.
Written under the LGPL