Autopsy
4.17.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
|
Static Public Member Functions | |
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) |
Private Member Functions | |
FileUtil () | |
Static Private Attributes | |
static final Logger | logger = Logger.getLogger(FileUtil.class.getName()) |
static final String | TEMP_FILE_EXT = null |
static final String | TEMP_FILE_NAME = "Autopsy" |
File and dir utilities
Definition at line 31 of file FileUtil.java.
|
private |
Prevents instantiation of this utility class.
Definition at line 203 of file FileUtil.java.
|
static |
Copy a file to a new directory, potentially new file name, and overwrite old one if requested
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) |
IOException | exception thrown if file copying failed |
Definition at line 116 of file FileUtil.java.
|
static |
Copy a folder into a new directory.
source | path to the source folder |
path | destination path of the new folder |
folderName | name of the new folder |
IOException | exception thrown if file copying failed |
Definition at line 150 of file FileUtil.java.
|
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.
dirPath | Path of the directory to delete |
Definition at line 47 of file FileUtil.java.
Referenced by org.sleuthkit.autopsy.casemodule.Case.deleteCaseDirectory(), org.sleuthkit.autopsy.coreutils.FileUtil.deleteFileDir(), org.sleuthkit.autopsy.casemodule.Case.deleteTempfilesFromCaseDirectory(), org.sleuthkit.autopsy.keywordsearch.SolrSearchService.deleteTextIndex(), and org.sleuthkit.autopsy.casemodule.Installer.restored().
|
static |
Delete the file or dir at the given path. If the path is for a directory, recursively delete its contents.
path | the path to the file or directory to delete |
Definition at line 87 of file FileUtil.java.
References org.sleuthkit.autopsy.coreutils.FileUtil.deleteDir().
Referenced by org.sleuthkit.autopsy.communications.VisualizationPanel.handleSnapshotEvent(), and org.sleuthkit.autopsy.directorytree.actionhelpers.ExtractActionHelper.runExtractionTasks().
|
static |
Escape special characters in a file name or a file name component
fileName | to escape |
Definition at line 169 of file FileUtil.java.
Referenced by org.sleuthkit.autopsy.report.modules.html.HTMLReport.addThumbnailRows(), org.sleuthkit.autopsy.report.modules.portablecase.PortableCaseReportModule.addUniqueFile(), org.sleuthkit.autopsy.modules.pictureanalyzer.impls.HEICProcessor.convertToJPEG(), org.sleuthkit.autopsy.report.modules.portablecase.PortableCaseReportModule.copyContent(), org.sleuthkit.autopsy.report.modules.html.HTMLReport.dataTypeToFileName(), org.sleuthkit.autopsy.corecomponents.DataContentViewerHex.BackgroundFileCopyTask.doInBackground(), org.sleuthkit.autopsy.directorytree.actionhelpers.ExtractActionHelper.extractFile(), org.sleuthkit.autopsy.directorytree.actionhelpers.ExtractActionHelper.extractFiles(), org.sleuthkit.autopsy.modules.pictureanalyzer.impls.HEICProcessor.extractToDisk(), org.sleuthkit.autopsy.communications.VisualizationPanel.handleSnapshotEvent(), org.sleuthkit.autopsy.report.modules.html.HTMLReport.makeCustomUniqueFilePath(), org.sleuthkit.autopsy.report.modules.html.HTMLReport.prepareThumbnail(), and org.sleuthkit.autopsy.timeline.actions.SaveSnapshotAsReport.SaveSnapshotAsReport().
|
static |
Test if the current user has read and write access to the dirPath.
dirPath | The path to the directory to test for read and write access. |
Definition at line 183 of file FileUtil.java.
Referenced by org.sleuthkit.autopsy.machinesettings.UserMachinePreferences.validateTempDirectory().
|
staticprivate |
Definition at line 33 of file FileUtil.java.
|
staticprivate |
Definition at line 35 of file FileUtil.java.
|
staticprivate |
Definition at line 34 of file FileUtil.java.
Copyright © 2012-2021 Basis Technology. Generated on: Tue Jan 19 2021
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.