Windows desktop applications
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

NavigationCmdletProvider.GetParentPath Method

Extracts the parent part of a path.


Namespace: System.Management.Automation.Provider
Assembly: System.Management.Automation (in System.Management.Automation.dll)

'Usage
Dim path As String
Dim root As String
Dim returnValue As String

returnValue = Me.GetParentPath(path, root)

protected virtual string GetParentPath (
	string path,
	string root
)
protected String GetParentPath (
	String path, 
	String root
)
protected function GetParentPath (
	path : String, 
	root : String
) : String

Parameters

path

The path to be parsed.

root

A fully-qualified path to the root of a drive. For more information, see the Remarks section.

Return Value

Parent part of the supplied path.

This method must be overridden to retrieve the child node of paths based on the syntax of the paths that the navigation provider is using. It is used with GetChildName to tokenize the path without having to know what the path separator is, or the ordering of the tokens in the path.

If the root parameter of this method passes a fully-qualified path to the root of a drive, the method must return a path to a container in the same tree as the root. However, this parameter can be null or empty if a mounted drive is not in use for the retrieval operation.

For more information about providers, see Windows PowerShell Providers.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

 

Target Platforms


Show:
© 2016 Microsoft