|
static boolean | deleteDir (File dirPath) |
|
static boolean | deleteFileDir (File path) |
|
static String | copyFile (String source, String destFolder, String newName, String ext, boolean overwrite) throws IOException |
|
static String | copyFolder (String source, String path, String folderName) throws IOException |
|
static String | escapeFileName (String fileName) |
|
File and dir utilities
Definition at line 29 of file FileUtil.java.
static String org.sleuthkit.autopsy.coreutils.FileUtil.copyFile |
( |
String |
source, |
|
|
String |
destFolder, |
|
|
String |
newName, |
|
|
String |
ext, |
|
|
boolean |
overwrite |
|
) |
| throws IOException |
|
static |
Copy a file to a new directory, potentially new file name, and overwrite old one if requested
- Parameters
-
source | source file path |
destFolder | destination folder path |
newName | file name of the copied file, which can be different from original |
ext | file extension, e.g. ".java" |
overwrite | if new file, already exists, overwrite it (delete it first) |
- Returns
- path to the created file, or null if file was not created
- Exceptions
-
IOException | exception thrown if file copying failed |
Definition at line 103 of file FileUtil.java.
static String org.sleuthkit.autopsy.coreutils.FileUtil.copyFolder |
( |
String |
source, |
|
|
String |
path, |
|
|
String |
folderName |
|
) |
| throws IOException |
|
static |
Copy a folder into a new directory.
- Parameters
-
source | path to the source folder |
path | destination path of the new folder |
folderName | name of the new folder |
- Returns
- path to the new folder if created, null if it was not created
- Exceptions
-
IOException | exception thrown if file copying failed |
Definition at line 138 of file FileUtil.java.
static boolean org.sleuthkit.autopsy.coreutils.FileUtil.deleteDir |
( |
File |
dirPath | ) |
|
|
static |
Recursively delete all of the files and sub-directories in a directory. Use deleteFileDir() if you are not sure if the path is a file or directory.
- Parameters
-
dirPath | Path of the directory to delete |
- Returns
- true if the dir was deleted with no errors. False otherwise (including if the passed in path was for a file).
Definition at line 40 of file FileUtil.java.
Referenced by org.sleuthkit.autopsy.coreutils.FileUtil.deleteFileDir().
static boolean org.sleuthkit.autopsy.coreutils.FileUtil.deleteFileDir |
( |
File |
path | ) |
|
|
static |
static String org.sleuthkit.autopsy.coreutils.FileUtil.escapeFileName |
( |
String |
fileName | ) |
|
|
static |
Escape special characters in a file name or a file name component
- Parameters
-
- Returns
- escaped string
Definition at line 155 of file FileUtil.java.
The documentation for this class was generated from the following file:
- /home/carriersleuth/repos/autopsy/Core/src/org/sleuthkit/autopsy/coreutils/FileUtil.java