antiufo / Shaman.ProcessUtils

Provides wrappers for executing external processes, capturing their stdout, and automatically checking their exit code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shaman.ProcessUtils

Library for working with external processes.

using Shaman.Runtime;

// Arguments are automatically quoted if necessary.
try
{
    ProcessUtils.Run("program", "arg1", "--option", "C:\Some directory\File.dat");
}
catch (ProcessException ex) when ex.ExitCode == 5
{
    // ex.ErrorText is the process' stderr
}

// RunPassThrough: prints stdout and stderr to the the current process stdout and stderr.
// RunFrom/RunPassThroughFrom: sets the current directory for the program.

About

Provides wrappers for executing external processes, capturing their stdout, and automatically checking their exit code.

License:MIT License


Languages

Language:C# 100.0%