public class CommandPath extends Object
| Constructor and Description |
|---|
CommandPath(List<? extends Path> directories)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
CommandPath |
append(CommandPath other)
Returns an appended path.
|
String |
asPathString()
Returns the path string.
|
Optional<Path> |
find(String command)
Returns a resolved file path of the specified command.
|
static int |
launch(Path command,
List<String> arguments,
Path workingDir,
Map<String,String> env)
Launches the command.
|
static CommandPath |
of(String pathString)
Creates a new instance.
|
static CommandPath |
system()
Creates a new instance from environment variables.
|
String |
toString() |
public CommandPath append(CommandPath other)
other - to be appended in the tail of this pathpublic static CommandPath system()
public static CommandPath of(String pathString)
pathString - the path stringpublic Optional<Path> find(String command)
command - the target command nameempty if there is no such a commandpublic String asPathString()
public static int launch(Path command, List<String> arguments, Path workingDir, Map<String,String> env)
command - the command locationarguments - the command argumentsworkingDir - the working directoryenv - the environment variablesCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.