Autopsy  4.19.3
Graphical digital forensics platform for The Sleuth Kit and other tools.
Static Public Member Functions | Static Private Member Functions | Static Private Attributes | List of all members
org.sleuthkit.autopsy.coreutils.PathValidator Class Reference

Static Public Member Functions

static boolean isValid (String path, Case.CaseType caseType)
 
static boolean isValidForCaseType (String path, Case.CaseType caseType)
 
static boolean isValidForMultiUserCase (String path, Case.CaseType caseType)
 
static boolean isValidForRunningOnTarget (String path)
 

Static Private Member Functions

static boolean checkForLiveAutopsy ()
 
static boolean pathIsMedia (String filePath)
 
static boolean pathOnCDrive (String filePath)
 

Static Private Attributes

static final Pattern driveLetterPattern = Pattern.compile("^[Cc]:.*$")
 
static final Pattern unixMediaDrivePattern = Pattern.compile("^\\/(media|mnt)\\/.*$")
 

Detailed Description

Validates absolute path (e.g. to a data source or case output folder) depending on case type.

Definition at line 30 of file PathValidator.java.

Member Function Documentation

static boolean org.sleuthkit.autopsy.coreutils.PathValidator.checkForLiveAutopsy ( )
staticprivate

Checks whether Autopsy is running from the external disk

Returns
true if Autopsy is running from external USB or CD

Definition at line 78 of file PathValidator.java.

References org.sleuthkit.autopsy.core.RuntimeProperties.isRunningInTarget().

Referenced by org.sleuthkit.autopsy.coreutils.PathValidator.isValidForRunningOnTarget().

static boolean org.sleuthkit.autopsy.coreutils.PathValidator.isValid ( String  path,
Case.CaseType  caseType 
)
static

Checks if the provided path is valid given the case type.

Parameters
path- the path to validate
caseType- the type of case which the path is being validated for
Returns
- boolean true for valid path, false for invalid path
Deprecated:

Definition at line 118 of file PathValidator.java.

References org.sleuthkit.autopsy.coreutils.PathValidator.isValidForCaseType().

static boolean org.sleuthkit.autopsy.coreutils.PathValidator.isValidForCaseType ( String  path,
Case.CaseType  caseType 
)
static

Checks if the provided path is valid given the case type.

Parameters
path- the path to validate
caseType- the type of case which the path is being validated for
Returns
- boolean true for valid path, false for invalid path

Definition at line 43 of file PathValidator.java.

References org.sleuthkit.autopsy.coreutils.UNCPathUtilities.isUNC(), org.sleuthkit.autopsy.casemodule.Case.CaseType.MULTI_USER_CASE, and org.sleuthkit.autopsy.coreutils.PathValidator.pathOnCDrive().

Referenced by org.sleuthkit.autopsy.coreutils.PathValidator.isValid(), org.sleuthkit.autopsy.coreutils.PathValidator.isValidForMultiUserCase(), and org.sleuthkit.autopsy.casemodule.ImageFilePanel.validatePanel().

static boolean org.sleuthkit.autopsy.coreutils.PathValidator.isValidForMultiUserCase ( String  path,
Case.CaseType  caseType 
)
static

Checks if the provided path is valid given the case type.

Parameters
path- the path to validate
caseType- the type of case which the path is being validated for
Returns
- boolean true for valid path, false for invalid path

Definition at line 131 of file PathValidator.java.

References org.sleuthkit.autopsy.coreutils.PathValidator.isValidForCaseType().

static boolean org.sleuthkit.autopsy.coreutils.PathValidator.isValidForRunningOnTarget ( String  path)
static
static boolean org.sleuthkit.autopsy.coreutils.PathValidator.pathIsMedia ( String  filePath)
staticprivate

Checks whether a file path contains "/mnt" or "/media"

Parameters
filePathInput file absolute path
Returns
true if path matches the pattern, false otherwise

Definition at line 89 of file PathValidator.java.

Referenced by org.sleuthkit.autopsy.coreutils.PathValidator.isValidForRunningOnTarget().

static boolean org.sleuthkit.autopsy.coreutils.PathValidator.pathOnCDrive ( String  filePath)
staticprivate

Checks whether a file path contains drive letter defined by pattern.

Parameters
filePathInput file absolute path
Returns
true if path matches the pattern, false otherwise.

Definition at line 101 of file PathValidator.java.

Referenced by org.sleuthkit.autopsy.coreutils.PathValidator.isValidForCaseType(), and org.sleuthkit.autopsy.coreutils.PathValidator.isValidForRunningOnTarget().

Member Data Documentation

final Pattern org.sleuthkit.autopsy.coreutils.PathValidator.driveLetterPattern = Pattern.compile("^[Cc]:.*$")
staticprivate

Definition at line 32 of file PathValidator.java.

final Pattern org.sleuthkit.autopsy.coreutils.PathValidator.unixMediaDrivePattern = Pattern.compile("^\\/(media|mnt)\\/.*$")
staticprivate

Definition at line 33 of file PathValidator.java.


The documentation for this class was generated from the following file:

Copyright © 2012-2022 Basis Technology. Generated on: Thu Oct 6 2022
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.