ExecutableFinder Class

Provides methods to locate executables in the system PATH.

public static class ExecutableFinder

Example

string? gitPath = ExecutableFinder.GetFullExecutablePath("git");
if (gitPath is not null)
{
    Assert.True(File.Exists(gitPath));
}

Methods

NameDescription
GetFullExecutablePath(string, string?)Searches for an executable in the system PATH and returns its full path if found.

GetFullExecutablePath(string, string?)

ExecutableFinder.cs

Searches for an executable in the system PATH and returns its full path if found.

public static string? GetFullExecutablePath(string executableName, string? workingDirectory = null)

Parameters

executableName string
workingDirectory string?

Returns

string?