Table of Contents

Interface IPathEnvironment

Namespace
Olve.Paths
Assembly
Olve.Paths.dll

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

path string

When this method returns, contains the path to the assembly if available; otherwise, null.

Returns

bool

true if 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

path string

When this method returns, contains the path if available; otherwise, null.

Returns

bool

true if the current directory was successfully retrieved; otherwise, false.