public class PathManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_EXT |
static java.lang.String |
DEFAULT_OPTIONS_FILE |
static java.lang.String |
OPTIONS_DIRECTORY |
static java.lang.String |
PROPERTIES_FILE |
static java.lang.String |
PROPERTIES_FILE_NAME |
static java.lang.String |
PROPERTY_CONFIG_PATH |
static java.lang.String |
PROPERTY_HOME_PATH |
static java.lang.String |
PROPERTY_LOG_CONFIG_FILE |
static java.lang.String |
PROPERTY_LOG_PATH |
static java.lang.String |
PROPERTY_PATHS_SELECTOR |
static java.lang.String |
PROPERTY_PLUGINS_PATH |
static java.lang.String |
PROPERTY_SCRATCH_PATH |
static java.lang.String |
PROPERTY_SYSTEM_PATH |
Constructor and Description |
---|
PathManager() |
Modifier and Type | Method and Description |
---|---|
static java.io.File |
findBinFile(java.lang.String fileName)
Looks for a file in all possible bin directories.
|
static java.io.File |
findBinFileWithException(java.lang.String fileName)
Looks for a file in all possible bin directories.
|
static java.io.File |
findFileInLibDirectory(java.lang.String relativePath) |
static java.lang.String |
getAbsolutePath(java.lang.String path) |
static java.lang.String |
getBinPath()
Bin path may be not what you want when developing an IDE.
|
static java.lang.String |
getCommunityHomePath() |
static java.nio.file.Path |
getConfigDir() |
static java.lang.String |
getConfigPath() |
static java.lang.String |
getCustomOptionsDirectory() |
static java.lang.String |
getDefaultConfigPathFor(java.lang.String selector) |
static java.lang.String |
getDefaultPluginPathFor(java.lang.String selector) |
static java.lang.String |
getDefaultSystemPathFor(java.lang.String selector) |
static java.lang.String |
getHomePath() |
static java.lang.String |
getHomePath(boolean insideIde) |
static java.lang.String |
getHomePathFor(java.lang.Class<?> aClass) |
static java.io.File |
getIndexRoot() |
static java.lang.String |
getJarPathForClass(java.lang.Class<?> aClass) |
static java.lang.String |
getLibPath() |
static java.lang.String |
getLogPath() |
static java.io.File |
getOptionsFile(java.lang.String fileName) |
static java.lang.String |
getOptionsPath() |
static java.lang.String |
getPathsSelector() |
static java.lang.String |
getPluginsPath() |
static java.lang.String |
getPluginTempPath() |
static java.lang.String |
getPreInstalledPluginsPath() |
static java.lang.String |
getResourceRoot(java.lang.Class<?> context,
java.lang.String path)
Attempts to detect classpath entry containing given resource.
|
static java.lang.String |
getResourceRoot(java.lang.ClassLoader cl,
java.lang.String resourcePath)
Attempts to detect classpath entry containing given resource.
|
static java.lang.String |
getScratchPath() |
static java.lang.String |
getSystemPath() |
static java.lang.String |
getTempPath() |
static java.util.Collection<java.lang.String> |
getUtilClassPath() |
static boolean |
isUnderHomeDirectory(java.lang.String path) |
static void |
loadProperties() |
static java.lang.String |
substituteVars(java.lang.String s) |
static java.lang.String |
substituteVars(java.lang.String s,
java.lang.String ideaHomePath) |
public static final java.lang.String PROPERTIES_FILE
public static final java.lang.String PROPERTIES_FILE_NAME
public static final java.lang.String PROPERTY_HOME_PATH
public static final java.lang.String PROPERTY_CONFIG_PATH
public static final java.lang.String PROPERTY_SYSTEM_PATH
public static final java.lang.String PROPERTY_SCRATCH_PATH
public static final java.lang.String PROPERTY_PLUGINS_PATH
public static final java.lang.String PROPERTY_LOG_PATH
public static final java.lang.String PROPERTY_LOG_CONFIG_FILE
public static final java.lang.String PROPERTY_PATHS_SELECTOR
public static final java.lang.String OPTIONS_DIRECTORY
public static final java.lang.String DEFAULT_EXT
public static final java.lang.String DEFAULT_OPTIONS_FILE
public static java.lang.String getHomePath()
public static java.lang.String getHomePath(boolean insideIde)
insideIde
- true
if the calling code works inside IDE; false
otherwise (e.g. in a build process or a script)public static boolean isUnderHomeDirectory(java.lang.String path)
public static java.lang.String getHomePathFor(java.lang.Class<?> aClass)
public static java.lang.String getBinPath()
findBinFile(String)
if applicable.public static java.io.File findBinFile(java.lang.String fileName)
null
if nothing found.findBinFileWithException(String)
public static java.io.File findBinFileWithException(java.lang.String fileName) throws java.io.FileNotFoundException
java.io.FileNotFoundException
- if nothing found.findBinFile(String)
public static java.lang.String getLibPath()
public static java.lang.String getPreInstalledPluginsPath()
public static java.lang.String getPathsSelector()
public static java.nio.file.Path getConfigDir()
public static java.lang.String getConfigPath()
public static java.lang.String getScratchPath()
public static java.lang.String getDefaultConfigPathFor(java.lang.String selector)
public static java.lang.String getOptionsPath()
public static java.io.File getOptionsFile(java.lang.String fileName)
public static java.lang.String getPluginsPath()
public static java.lang.String getDefaultPluginPathFor(java.lang.String selector)
public static java.lang.String getCustomOptionsDirectory()
public static java.lang.String getSystemPath()
public static java.lang.String getDefaultSystemPathFor(java.lang.String selector)
public static java.lang.String getTempPath()
public static java.io.File getIndexRoot()
public static java.lang.String getLogPath()
public static java.lang.String getPluginTempPath()
public static java.lang.String getResourceRoot(java.lang.Class<?> context, java.lang.String path)
public static java.lang.String getResourceRoot(java.lang.ClassLoader cl, java.lang.String resourcePath)
public static void loadProperties()
public static java.lang.String substituteVars(java.lang.String s)
public static java.lang.String substituteVars(java.lang.String s, java.lang.String ideaHomePath)
public static java.io.File findFileInLibDirectory(java.lang.String relativePath)
public static java.lang.String getCommunityHomePath()
public static java.lang.String getJarPathForClass(java.lang.Class<?> aClass)
public static java.util.Collection<java.lang.String> getUtilClassPath()
public static java.lang.String getAbsolutePath(java.lang.String path)