Interface IPathEnvironment
Provides access to environment-dependent path information, such as the current working directory or executable path.
public interface IPathEnvironment
Methods
TryGetAssemblyExecutable(out string?)
Attempts to retrieve the file path of the currently executing assembly.
bool TryGetAssemblyExecutable(out string? path)
Parameters
pathstringWhen this method returns, contains the path to the assembly if available; otherwise,
null.
Returns
- bool
trueif the assembly executable path was successfully retrieved; otherwise,false.
TryGetCurrentDirectory(out string?)
Attempts to retrieve the current working directory.
bool TryGetCurrentDirectory(out string? path)
Parameters
pathstringWhen this method returns, contains the path if available; otherwise,
null.
Returns
- bool
trueif the current directory was successfully retrieved; otherwise,false.