|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openejb.util.FileUtils
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 |
static FileUtils |
getBase()
|
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)
|
static FileUtils |
getHome()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static FileUtils getBase()
public static FileUtils getHome()
public File getDirectory(String path) throws IOException
IOException
getDirectory(String, boolean)
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 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 |