Shell

Contains utility functions regarding the Shell/process execution.

Members

Static functions

doesCommandExist
bool doesCommandExist(string command)

Tries to determine if the given command exists.

enforceCommandExists
void enforceCommandExists(string command)

Enforce that the given command/executable exists.

execute
Result execute(string command)

Executes a command via std.process.executeShell, and collects its results.

executeEnforceStatusPositive
Result executeEnforceStatusPositive(string command)

Executes a command via std.process.executeShell, enforcing that the process' exit code was >= 0.

executeEnforceStatusZero
Result executeEnforceStatusZero(string command)

Executes a command via std.process.executeShell, enforcing that the process' exit code was 0.

executeHasNonEmptyOutput
bool executeHasNonEmptyOutput(string command)

Executes a command via std.process.executeShell, and checks to see if the output was empty.

isInPowershell
bool isInPowershell()

Tries to determine if the current shell is Powershell.

popLocation
void popLocation()

Pops the working directory stack, and then changes the current working directory to it.

pushLocation
void pushLocation(string dir)

Pushes the current working directory onto a stack, and then changes directory.

verboseLogfln
void verboseLogfln(string format, Args args)

Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

useVerboseOutput
bool useVerboseOutput;

Undocumented in source.

Structs

Result
struct Result

The result of executing a process.

Meta