public class PathEnvironmentVariableUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.util.List<java.io.File> |
findAllExeFilesInPath(java.lang.String fileBaseName)
Finds all executable files with the specified base name, that are located in directories
from PATH environment variable.
|
static java.util.List<java.io.File> |
findAllExeFilesInPath(java.lang.String fileBaseName,
java.io.FileFilter filter) |
static java.lang.String |
findExecutableInWindowsPath(java.lang.String exePath) |
static java.lang.String |
findExecutableInWindowsPath(java.lang.String exePath,
java.lang.String defaultPath) |
static java.io.File |
findInPath(java.lang.String fileBaseName)
Finds an executable file with the specified base name, that is located in a directory
listed in PATH environment variable.
|
static java.io.File |
findInPath(java.lang.String fileBaseName,
java.io.FileFilter filter)
Finds an executable file with the specified base name, that is located in a directory
listed in PATH environment variable and is accepted by filter.
|
static java.io.File |
findInPath(java.lang.String fileBaseName,
java.lang.String pathVariableValue,
java.io.FileFilter filter)
Finds an executable file with the specified base name, that is located in a directory
listed in the passed PATH environment variable value and is accepted by filter.
|
static java.util.List<java.lang.String> |
getPathDirs(java.lang.String pathEnvVarValue) |
static java.lang.String |
getPathVariableValue()
Retrieves the value of PATH environment variable
|
static java.util.List<java.lang.String> |
getWindowsExecutableFileExtensions() |
public static java.io.File findInPath(java.lang.String fileBaseName)
fileBaseName
- file base nameFile
instance or null if not foundpublic static java.io.File findInPath(java.lang.String fileBaseName, java.io.FileFilter filter)
fileBaseName
- file base namefilter
- exe file filterFile
instance or null if not foundpublic static java.io.File findInPath(java.lang.String fileBaseName, java.lang.String pathVariableValue, java.io.FileFilter filter)
fileBaseName
- file base namepathVariableValue
- value of PATH environment variablefilter
- exe file filterFile
instance or null if not foundpublic static java.util.List<java.io.File> findAllExeFilesInPath(java.lang.String fileBaseName)
fileBaseName
- file base namepublic static java.util.List<java.io.File> findAllExeFilesInPath(java.lang.String fileBaseName, java.io.FileFilter filter)
public static java.util.List<java.lang.String> getPathDirs(java.lang.String pathEnvVarValue)
public static java.util.List<java.lang.String> getWindowsExecutableFileExtensions()
public static java.lang.String findExecutableInWindowsPath(java.lang.String exePath)
public static java.lang.String findExecutableInWindowsPath(java.lang.String exePath, java.lang.String defaultPath)
public static java.lang.String getPathVariableValue()