|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openejb.util.FileUtils
public class FileUtils
Constructor Summary | |
---|---|
FileUtils(java.lang.String homeDir,
java.lang.String defaultDir,
java.util.Hashtable env)
|
Method Summary | |
---|---|
static void |
copyFile(java.io.File destination,
java.io.File source)
Copies the contents of one file to another. |
static void |
copyFile(java.io.File destination,
java.io.File source,
boolean deleteSourceFile)
Copies the contents of one file to another. |
static java.io.File |
createTempDirectory()
Creates a string for a temporary directory The path prefix is chosen from the system property "java.io.tmpdir" plus a file separator plus the string "openejb" @returns the file object associated with the unique name |
static java.io.File |
createTempDirectory(java.lang.String pathPrefix)
Creates a string for a temporary directory |
boolean |
equals(java.lang.Object obj)
|
java.io.File |
getDirectory()
|
java.io.File |
getDirectory(java.lang.String path)
|
java.io.File |
getDirectory(java.lang.String path,
boolean create)
Resolves the specified path relative to the home directory; create it if requested |
java.io.File |
getFile(java.lang.String path)
|
java.io.File |
getFile(java.lang.String path,
boolean validate)
|
void |
setDirectory(java.io.File dir)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileUtils(java.lang.String homeDir, java.lang.String defaultDir, java.util.Hashtable env)
Method Detail |
---|
public java.io.File getDirectory(java.lang.String path) throws java.io.IOException
java.io.IOException
getDirectory(String, boolean)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.io.File getDirectory(java.lang.String path, boolean create) throws java.io.IOException
path
- relative path to the home directorycreate
- shall the directory be created if it doesn't exist?
java.io.IOException
public java.io.File getDirectory()
public void setDirectory(java.io.File dir)
public java.io.File getFile(java.lang.String path) throws java.io.FileNotFoundException, java.io.IOException
java.io.FileNotFoundException
java.io.IOException
public java.io.File getFile(java.lang.String path, boolean validate) throws java.io.FileNotFoundException, java.io.IOException
java.io.FileNotFoundException
java.io.IOException
public static java.io.File createTempDirectory(java.lang.String pathPrefix) throws java.io.IOException
pathPrefix
- the path prefix to for the directory, e.g. /tmp/openejb @returns the file object associated with the
unique name
java.io.IOException
- if it can't find a unique directory name after many iterationspublic static java.io.File createTempDirectory() throws java.io.IOException
java.io.IOException
- if it can't find a unique directory name after many iterationspublic static void copyFile(java.io.File destination, java.io.File source) throws java.io.IOException
destination
- Destination filesource
- Source file
java.io.IOException
- Thrown if there is an error copying the file.public static void copyFile(java.io.File destination, java.io.File source, boolean deleteSourceFile) throws java.io.IOException
destination
- Destination filesource
- Source filedeleteSourceFile
- whether or not to delete the source file
java.io.IOException
- Thrown if there is an error copying the file.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |