Delen via


NavigationCmdletProvider.GetParentPath(String, String) Method

Definition

Removes the child segment of a path and returns the remaining parent portion.

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

Parameters

path
String

A fully qualified provider specific path to an item. The item may or may not exist.

root
String

The fully qualified path to the root of a drive. This parameter may be null or empty if a mounted drive is not in use for this operation. If this parameter is not null or empty the result of the method should not be a path to a container that is a parent or in a different tree than the root.

Returns

The path of the parent of the path parameter.

Remarks

This should be a lexical splitting of the path on the path separator character for the provider namespace. For example, the file system provider should look for the last "\" and return everything to the left of the "\".

Applies to