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

Field Summary
protected static FileUtils s_instance
           
 
Constructor Summary
protected FileUtils()
          Default Constructor
 
Method Summary
 void copyFileToDirectory(File source, File dir)
           
 void copyFileToFile(File source, File target)
           
 File[] findFileRecurse(File baseDir, FilenameFilter filter)
          Recursively descends into the base directory, looking for all files that pass the filter.
static FileUtils getInstance()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

s_instance

protected static FileUtils s_instance
Constructor Detail

FileUtils

protected FileUtils()
Default Constructor
Method Detail

getInstance

public static FileUtils getInstance()

copyFileToDirectory

public void copyFileToDirectory(File source,
                                File dir)
                         throws IOException
Parameters:
source - the source file to copy
dir - 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