public class PluginPaths
extends java.lang.Object
Constructor and Description |
---|
PluginPaths() |
Modifier and Type | Method and Description |
---|---|
static java.nio.file.Path |
getConfigPath()
Returns an absolute path to the configuration file, where the configuration to be loaded for
the plugin is located.
|
static java.nio.file.Path |
getDebugFolder()
Returns an absolute path to the debug folder, where debug files are stored.
|
static java.nio.file.Path |
getEditorFolder()
Returns an absolute path to the editor folder, where any files concerning
BrowserEditor instances are stored. |
static java.nio.file.Path |
getLanguageFolder()
Returns an absolute path to the language folder, where all language files are stored.
|
static java.nio.file.Path |
getLanguagePath(java.lang.String fileName)
Returns an absolute path to the language file stored under the given file name.
|
static java.nio.file.Path |
getManualFolder()
Returns an absolute path to the manual folder, where all manual files are stored.
|
static java.lang.String |
getPathForHtml(java.nio.file.Path path)
Returns the given path in a form which is suitable to use in HTML, e.g.
|
static java.nio.file.Path |
getPluginFolder()
Returns an absolute path to the folder where the plugin files are located.
|
static java.nio.file.Path |
getSchemaPath()
Returns an absolute path to the schema file, where the schema to be loaded for the plugin's configuration
is located.
|
static java.nio.file.Path |
getTelemetryFolder()
Returns an absolute path to the telemetry folder, where telemetry files are stored.
|
static java.nio.file.Path |
getUserFolder()
Returns an absolute path to the folder where the user-defined files are located.
|
static boolean |
resetConfigPath()
Resets the configuration path to its default value.
|
static void |
resetFolder(java.nio.file.Path folder)
Resets the given folder.
|
static boolean |
setConfigPath(java.nio.file.Path path)
Set the configuration path to the given path.
|
static java.util.concurrent.Future<java.lang.Boolean> |
storeConfiguration()
Store the current configuration on file.
|
public static java.nio.file.Path getPluginFolder()
public static java.nio.file.Path getUserFolder()
public static java.util.concurrent.Future<java.lang.Boolean> storeConfiguration()
public static java.nio.file.Path getConfigPath()
public static boolean setConfigPath(java.nio.file.Path path)
path
- The path to set the configuration path to.public static boolean resetConfigPath()
public static java.nio.file.Path getSchemaPath()
public static java.nio.file.Path getEditorFolder()
BrowserEditor
instances are stored.public static java.nio.file.Path getLanguageFolder()
public static java.nio.file.Path getLanguagePath(java.lang.String fileName)
fileName
- The fileName for which to get the language. This must be only the name, not a path.public static java.nio.file.Path getManualFolder()
public static java.lang.String getPathForHtml(java.nio.file.Path path)
path
- The path to make suitable.public static java.nio.file.Path getDebugFolder()
public static java.nio.file.Path getTelemetryFolder()
public static void resetFolder(java.nio.file.Path folder) throws java.io.IOException
java.io.IOException
- If any of the operations during resetting throw an IOException, it is sent further.