net.sourceforge.groboutils.util.io.v1
Class FileUtils
java.lang.Object
net.sourceforge.groboutils.util.io.v1.FileUtils
- public class FileUtils
- extends java.lang.Object
Simple and common file operations in a Utility class.
- Since:
- December 13, 2000
- Version:
- $Date: 2003/05/19 20:31:47 $
- Author:
- Matt Albrecht groboclown@users.sourceforge.net
Constructor Summary |
protected |
FileUtils()
Default Constructor |
Method Summary |
void |
copyFileToDirectory(java.io.File source,
java.io.File dir)
|
void |
copyFileToFile(java.io.File source,
java.io.File target)
|
java.io.File[] |
findFileRecurse(java.io.File baseDir,
java.io.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, 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(java.io.File source,
java.io.File dir)
throws java.io.IOException
- Parameters:
source
- the source file to copydir
- the target directory to copy the sourcefile into: the
name will remain the same.
- Throws:
java.io.IOException
copyFileToFile
public void copyFileToFile(java.io.File source,
java.io.File target)
throws java.io.IOException
- Parameters:
source
- the source file to copy from.target
- the target file to copy to.
- Throws:
java.io.IOException
findFileRecurse
public java.io.File[] findFileRecurse(java.io.File baseDir,
java.io.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.
Copyright © 2001-2003 by The GroboUtils Project