|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dtolabs.rundeck.core.utils.FileUtils
public class FileUtils
TODO: Consider wrapping FileUtils
Constructor Summary | |
---|---|
FileUtils()
|
Method Summary | |
---|---|
static void |
copyDirectory(java.io.File sourceLocation,
java.io.File targetLocation)
Copy one directory to another location (recursively) |
static void |
copyFileStreams(java.io.File fromFile,
java.io.File toFile)
Copy a file from one location to another, and set the modification time to match. |
static boolean |
deleteDir(java.io.File dir)
Delete a directory recursivley. |
static void |
fileCopy(java.io.File src,
java.io.File dest,
boolean overwrite)
Copies file src to dest using nio. |
static void |
fileRename(java.io.File file,
java.lang.String newPath)
Rename a file |
static void |
fileRename(java.io.File file,
java.lang.String newPath,
java.lang.Class clazz)
Rename a file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileUtils()
Method Detail |
---|
public static void fileCopy(java.io.File src, java.io.File dest, boolean overwrite) throws java.io.IOException
src
- dest
- overwrite
-
java.io.IOException
public static void copyFileStreams(java.io.File fromFile, java.io.File toFile) throws java.io.IOException
fromFile
- toFile
-
java.io.IOException
public static boolean deleteDir(java.io.File dir)
dir
- Directory to delete
public static void fileRename(java.io.File file, java.lang.String newPath, java.lang.Class clazz)
file
- File to renamenewPath
- Path for new file nameclazz
- Class associated with lock
CoreException
- An CoreException is raised if any underly I/O
operation fails.public static void fileRename(java.io.File file, java.lang.String newPath)
file
- File to renamenewPath
- Path for new file name
CoreException
- An CoreException is raised if any underly I/O
operation fails.public static void copyDirectory(java.io.File sourceLocation, java.io.File targetLocation) throws java.io.IOException
sourceLocation
- Source directorytargetLocation
- Target directory
java.io.IOException
- Exception raised if any underlying I/O operation fails
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |