Share via


PathIntrinsics.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.

public:
 System::String ^ NormalizeRelativePath(System::String ^ path, System::String ^ basePath);
public:
 Platform::String ^ NormalizeRelativePath(Platform::String ^ path, Platform::String ^ basePath);
std::wstring NormalizeRelativePath(std::wstring const & path, std::wstring const & basePath);
public string NormalizeRelativePath (string path, string basePath);
member this.NormalizeRelativePath : string * string -> string
Public Function NormalizeRelativePath (path As String, basePath As String) As String

Parameters

path
String

A PowerShell 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

A normalized path that is relative to the basePath that was passed.

Exceptions

If path is null.

If the providerInstance does not support this operation.

If the pipeline is being stopped while executing the command.

If the provider threw an exception.

Applies to