Package com.facebook.buck.io
Class ExecutableFinder
- java.lang.Object
-
- com.facebook.buck.io.ExecutableFinder
-
public class ExecutableFinder extends Object
Given the name of an executable, search a set of (possibly platform-specific) known locations for that executable.
-
-
Constructor Summary
Constructors Constructor Description ExecutableFinder()
ExecutableFinder(Platform platform)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Path
getExecutable(Path suggestedExecutable, com.google.common.collect.ImmutableMap<String,String> env)
static com.google.common.collect.ImmutableSet<String>
getExecutableSuffixes(Platform platform, com.google.common.collect.ImmutableMap<String,String> env)
Optional<Path>
getOptionalExecutable(Path suggestedExecutable, com.google.common.collect.ImmutableCollection<Path> path, com.google.common.collect.ImmutableCollection<String> fileSuffixes)
Optional<Path>
getOptionalExecutable(Path suggestedExecutable, com.google.common.collect.ImmutableMap<String,String> env)
Optional<Path>
getOptionalExecutable(Path suggestedExecutable, Path basePath)
Optional<Path>
getOptionalToolPath(String tool, com.google.common.collect.ImmutableList<Path> toolSearchPaths)
static boolean
isExecutable(Path exe)
-
-
-
Constructor Detail
-
ExecutableFinder
public ExecutableFinder()
-
ExecutableFinder
public ExecutableFinder(Platform platform)
-
-
Method Detail
-
getExecutable
public Path getExecutable(Path suggestedExecutable, com.google.common.collect.ImmutableMap<String,String> env)
-
getOptionalExecutable
public Optional<Path> getOptionalExecutable(Path suggestedExecutable, com.google.common.collect.ImmutableMap<String,String> env)
-
getOptionalExecutable
public Optional<Path> getOptionalExecutable(Path suggestedExecutable, Path basePath)
-
getOptionalExecutable
public Optional<Path> getOptionalExecutable(Path suggestedExecutable, com.google.common.collect.ImmutableCollection<Path> path, com.google.common.collect.ImmutableCollection<String> fileSuffixes)
-
isExecutable
public static boolean isExecutable(Path exe)
-
getExecutableSuffixes
public static com.google.common.collect.ImmutableSet<String> getExecutableSuffixes(Platform platform, com.google.common.collect.ImmutableMap<String,String> env)
-
-