|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.v2.build.agent.capability.ExecutablePathUtils
public final class ExecutablePathUtils
Method Summary | |
---|---|
static java.io.File |
detectExecutableOnPath(java.lang.String executableName)
Detects the executable home directory and validates that it matches the required pattern using existsInHomeBinExePattern(String, String) |
static boolean |
existsInHomeBinExePattern(java.lang.String homePath,
java.lang.String executableName)
Validates that the executable exists at the path ${homePath}/bin/${executableName} Appends ".bat" to the executable name if the platform is Windows |
static java.io.File |
findExecutable(java.lang.String executableName,
com.google.common.base.Predicate<java.io.File> validityPredicate,
java.lang.String envHomeDir,
java.lang.String fhsHome)
This method will return the executable home path, searching first in environment home, then on PATH, finally in a FHS - compliant directory. |
static java.lang.String |
findExecutablePath(java.lang.String executableName)
Finds the path of the executable given its name. |
static java.io.File |
getHomeFromExecutableInHomeBin(java.io.File executable)
Gets the home directory for an executable if its parent directory is 'bin' |
static java.lang.String |
makeBatchIfOnWindows(java.lang.String builder)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean existsInHomeBinExePattern(@Nullable java.lang.String homePath, @NotNull java.lang.String executableName)
homePath
- executableName
-
@NotNull public static java.lang.String makeBatchIfOnWindows(java.lang.String builder)
@Nullable public static java.io.File detectExecutableOnPath(@NotNull java.lang.String executableName)
existsInHomeBinExePattern(String, String)
executableName
- of the builder executable
@Nullable public static java.io.File getHomeFromExecutableInHomeBin(@NotNull java.io.File executable)
executable
- the executable file used to detect the home directory
@Nullable public static java.io.File findExecutable(@NotNull java.lang.String executableName, @Nullable com.google.common.base.Predicate<java.io.File> validityPredicate, @Nullable java.lang.String envHomeDir, @Nullable java.lang.String fhsHome)
executableName
- executable name to search forvalidityPredicate
- predicate used to validate the executable pathenvHomeDir
- home directory from environmentfhsHome
- FHS-compliant home directory
@Nullable public static java.lang.String findExecutablePath(@NotNull java.lang.String executableName)
executableName
- of the executable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |