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

Classes

enum  TempDirChoice
 

Static Public Member Functions

static String getCustomTempDirectory ()
 
static TempDirChoice getTempDirChoice ()
 
static void setCustomTempDirectory (String path) throws UserMachinePreferencesException
 
static void setTempDirChoice (TempDirChoice tempDirChoice) throws UserMachinePreferencesException
 

Private Member Functions

 UserMachinePreferences ()
 

Static Private Member Functions

static boolean validateTempDirectory (String path) throws UserMachinePreferencesException
 

Static Private Attributes

static final String CUSTOM_TEMP_DIR_KEY = "TempDirectory"
 
static final TempDirChoice DEFAULT_CHOICE = TempDirChoice.SYSTEM
 
static final Logger logger = Logger.getLogger(UserMachinePreferences.class.getName())
 
static final Preferences preferences = NbPreferences.forModule(UserMachinePreferences.class)
 
static final String TEMP_DIR_CHOICE_KEY = "TempDirChoice"
 

Detailed Description

Provides case-specific settings like the user-specified temp folder.

NOTE: The Case class also handles providing a temp directory. When altering code in this class, also look at the Case class as well.

Definition at line 38 of file UserMachinePreferences.java.

Constructor & Destructor Documentation

org.sleuthkit.autopsy.machinesettings.UserMachinePreferences.UserMachinePreferences ( )
private

Definition at line 164 of file UserMachinePreferences.java.

Member Function Documentation

static String org.sleuthkit.autopsy.machinesettings.UserMachinePreferences.getCustomTempDirectory ( )
static
Returns
The user-specified custom temp directory path or empty string.

Definition at line 87 of file UserMachinePreferences.java.

Referenced by org.sleuthkit.autopsy.core.UserPreferences.getAppTempDirectory(), and org.sleuthkit.autopsy.casemodule.Case.getTempDirectory().

static TempDirChoice org.sleuthkit.autopsy.machinesettings.UserMachinePreferences.getTempDirChoice ( )
static
Returns
The user selection for how the temp directory should be handled (temp directory in case folder, in java.io.tmpdir, custom path). Guaranteed to be non-null.

Definition at line 144 of file UserMachinePreferences.java.

References org.sleuthkit.autopsy.machinesettings.UserMachinePreferences.TempDirChoice.getValue().

Referenced by org.sleuthkit.autopsy.core.UserPreferences.getAppTempDirectory(), and org.sleuthkit.autopsy.casemodule.Case.getTempDirectory().

static void org.sleuthkit.autopsy.machinesettings.UserMachinePreferences.setCustomTempDirectory ( String  path) throws UserMachinePreferencesException
static

Sets the base user-specified temporary directory.

Parameters
pathThe path to the directory.
Exceptions
UserMachinePreferencesExceptionIf the directory cannot be accessed or created.

Definition at line 134 of file UserMachinePreferences.java.

References org.sleuthkit.autopsy.machinesettings.UserMachinePreferences.validateTempDirectory().

static void org.sleuthkit.autopsy.machinesettings.UserMachinePreferences.setTempDirChoice ( TempDirChoice  tempDirChoice) throws UserMachinePreferencesException
static

Sets the temp directory choice (i.e. system, case, custom).

Parameters
tempDirChoiceThe choice (must be non-null).
Exceptions
UserMachinePreferencesException

Definition at line 156 of file UserMachinePreferences.java.

static boolean org.sleuthkit.autopsy.machinesettings.UserMachinePreferences.validateTempDirectory ( String  path) throws UserMachinePreferencesException
staticprivate

Checks to see if temporary directory location can be created and is read/write.

Parameters
pathThe location.
Returns
True if this is a valid location for a temp directory.
Exceptions
UserMachinePreferencesExceptionIf path could not be validated due to mkdirs failure or the directory is not read/write.

Definition at line 109 of file UserMachinePreferences.java.

References org.sleuthkit.autopsy.coreutils.FileUtil.hasReadWriteAccess().

Referenced by org.sleuthkit.autopsy.machinesettings.UserMachinePreferences.setCustomTempDirectory().

Member Data Documentation

final String org.sleuthkit.autopsy.machinesettings.UserMachinePreferences.CUSTOM_TEMP_DIR_KEY = "TempDirectory"
staticprivate

Definition at line 79 of file UserMachinePreferences.java.

final TempDirChoice org.sleuthkit.autopsy.machinesettings.UserMachinePreferences.DEFAULT_CHOICE = TempDirChoice.SYSTEM
staticprivate

Definition at line 82 of file UserMachinePreferences.java.

final Logger org.sleuthkit.autopsy.machinesettings.UserMachinePreferences.logger = Logger.getLogger(UserMachinePreferences.class.getName())
staticprivate

Definition at line 40 of file UserMachinePreferences.java.

final Preferences org.sleuthkit.autopsy.machinesettings.UserMachinePreferences.preferences = NbPreferences.forModule(UserMachinePreferences.class)
staticprivate

Definition at line 41 of file UserMachinePreferences.java.

final String org.sleuthkit.autopsy.machinesettings.UserMachinePreferences.TEMP_DIR_CHOICE_KEY = "TempDirChoice"
staticprivate

Definition at line 80 of file UserMachinePreferences.java.


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

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