Class JosmBaseDirectories
java.lang.Object
org.openstreetmap.josm.data.preferences.JosmBaseDirectories
- All Implemented Interfaces:
IBaseDirectories
Class provides base directory locations for JOSM.
- Since:
- 13021
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClears any previously calculated values used forgetPreferencesDirectory(boolean),getCacheDirectory(boolean)orgetUserDataDirectory(boolean).getCacheDirectory(boolean createIfMissing) Get the directory where user-specific cached content (non-essential data) should be stored.static JosmBaseDirectoriesReturns the unique instance.getPreferencesDirectory(boolean createIfMissing) Get the directory where user-specific configuration and preferences should be stored.getUserDataDirectory(boolean createIfMissing) Get the directory where user-specific data files should be stored.
-
Field Details
-
preferencesDir
Internal storage for the preference directory. -
cacheDir
Internal storage for the cache directory. -
userdataDir
Internal storage for the user data directory.
-
-
Constructor Details
-
JosmBaseDirectories
private JosmBaseDirectories()
-
-
Method Details
-
getInstance
Returns the unique instance.- Returns:
- the unique instance
-
getPreferencesDirectory
Description copied from interface:IBaseDirectoriesGet the directory where user-specific configuration and preferences should be stored.- Specified by:
getPreferencesDirectoryin interfaceIBaseDirectories- Parameters:
createIfMissing- if true, automatically creates this directory, in case it is missing- Returns:
- the preferences directory
-
getUserDataDirectory
Description copied from interface:IBaseDirectoriesGet the directory where user-specific data files should be stored.- Specified by:
getUserDataDirectoryin interfaceIBaseDirectories- Parameters:
createIfMissing- if true, automatically creates this directory, in case it is missing- Returns:
- the user data directory
-
getCacheDirectory
Description copied from interface:IBaseDirectoriesGet the directory where user-specific cached content (non-essential data) should be stored.- Specified by:
getCacheDirectoryin interfaceIBaseDirectories- Parameters:
createIfMissing- if true, automatically creates this directory, in case it is missing- Returns:
- the cache directory
-
clearMemos
Clears any previously calculated values used forgetPreferencesDirectory(boolean),getCacheDirectory(boolean)orgetUserDataDirectory(boolean). Useful for tests.- Since:
- 14052
-