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