Table of Contents

Method TryGetExactPath

Namespace
Alternet.Common
Assembly
Alternet.Common.v9.dll

TryGetExactPath(string, out string?)

Gets the exact case used on the file system for an existing file or directory.

public static bool TryGetExactPath(string path, out string? exactPath)

Parameters

path string

A relative or absolute path.

exactPath string

The full path using the correct case if the path exists. Otherwise, null.

Returns

bool

True if the exact path was found. False otherwise.

Remarks

This supports drive-lettered paths and UNC paths, but a UNC root will be returned in title case (e.g., \Server\Share).