Go to the documentation of this file.
19package org.sleuthkit.autopsy.machinesettings;
22import java.nio.file.Paths;
23import java.util.Optional;
24import java.util.prefs.Preferences;
25import java.util.stream.Stream;
26import org.apache.commons.lang3.StringUtils;
27import org.openide.util.NbBundle;
28import org.openide.util.NbPreferences;
29import org.sleuthkit.autopsy.coreutils.FileUtil;
30import org.sleuthkit.autopsy.coreutils.Logger;
68 static Optional<TempDirChoice>
getValue(String val) {
70 return Optional.empty();
74 .filter(tempChoice -> tempChoice.name().equalsIgnoreCase(val.trim()))
105 "UserMachinePreferences_validateTempDirectory_errorOnCreate_text=There was an error creating the temp directory for path: {0}",
107 "UserMachinePreferences_validateTempDirectory_errorOnReadWrite_text=There was an error reading or writing to temp directory path: {0}"
110 if (StringUtils.isBlank(path)) {
115 File f =
new File(path);
116 if (!f.exists() && !f.mkdirs()) {
157 if (tempDirChoice ==
null) {
static boolean hasReadWriteAccess(Path dirPath)
synchronized static Logger getLogger(String name)
static void setTempDirChoice(TempDirChoice tempDirChoice)
static boolean validateTempDirectory(String path)
static final Logger logger
static void setCustomTempDirectory(String path)
static final Preferences preferences
static final String CUSTOM_TEMP_DIR_KEY
static final String TEMP_DIR_CHOICE_KEY
static final TempDirChoice DEFAULT_CHOICE
static String getCustomTempDirectory()
static TempDirChoice getTempDirChoice()
static Optional< TempDirChoice > getValue(String val)
Copyright © 2012-2024 Sleuth Kit Labs. Generated on:
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.