NavigationCmdletProvider.NormalizeRelativePath(String, String) Method

Definition

Normalizes the path that was passed in and returns the normalized path as a relative path to the basePath that was passed.

protected:
 virtual System::String ^ NormalizeRelativePath(System::String ^ path, System::String ^ basePath);
protected:
 virtual Platform::String ^ NormalizeRelativePath(Platform::String ^ path, Platform::String ^ basePath);
 virtual std::wstring NormalizeRelativePath(std::wstring const & path, std::wstring const & basePath);
protected virtual string NormalizeRelativePath (string path, string basePath);
abstract member NormalizeRelativePath : string * string -> string
override this.NormalizeRelativePath : string * string -> string
Protected Overridable Function NormalizeRelativePath (path As String, basePath As String) As String

Parameters

path
String

A fully qualified provider specific path to an item. The item should exist or the provider should write out an error.

basePath
String

The path that the return value should be relative to.

Returns

String

A normalized path that is relative to the basePath that was passed. The provider should parse the path parameter, normalize the path, and then return the normalized path relative to the basePath.

Remarks

This method does not have to be purely syntactical parsing of the path. It

is encouraged that the provider actually use the path to lookup in its store

and create a relative path that matches the casing, and standardized path syntax.

Note, the base class implemenation uses GetParentPath, GetChildName, and MakePath

to normalize the path and then make it relative to basePath. All string comparisons

are done using StringComparison.InvariantCultureIngoreCase.

Applies to