|
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 boolean | deleteDir (File dirPath) |
|
static boolean | deleteFileDir (File path) |
|
static String | escapeFileName (String fileName) |
|
static boolean | hasReadWriteAccess (Path dirPath) |
|
File and dir utilities
Definition at line 31 of file FileUtil.java.
org.sleuthkit.autopsy.coreutils.FileUtil.FileUtil |
( |
| ) |
|
|
private |
Prevents instantiation of this utility class.
Definition at line 203 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 116 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 150 of file FileUtil.java.
static boolean org.sleuthkit.autopsy.coreutils.FileUtil.deleteDir |
( |
File |
dirPath | ) |
|
|
static |
static boolean org.sleuthkit.autopsy.coreutils.FileUtil.deleteFileDir |
( |
File |
path | ) |
|
|
static |
static String org.sleuthkit.autopsy.coreutils.FileUtil.escapeFileName |
( |
String |
fileName | ) |
|
|
static |
static boolean org.sleuthkit.autopsy.coreutils.FileUtil.hasReadWriteAccess |
( |
Path |
dirPath | ) |
|
|
static |
Test if the current user has read and write access to the dirPath.
- Parameters
-
dirPath | The path to the directory to test for read and write access. |
- Returns
- True if we have both read and write access, false otherwise.
Definition at line 183 of file FileUtil.java.
final String org.sleuthkit.autopsy.coreutils.FileUtil.TEMP_FILE_EXT = null |
|
staticprivate |
final String org.sleuthkit.autopsy.coreutils.FileUtil.TEMP_FILE_NAME = "Autopsy" |
|
staticprivate |
The documentation for this class was generated from the following file:
- /home/carriersleuth/repos/autopsy/Core/src/org/sleuthkit/autopsy/coreutils/FileUtil.java