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

Windows 98, Windows 2000, Windows 2000 Server, Windows CE, Windows Server 2008, Windows 98 Second Edition, Pocket PC, Smart Phone, Windows Server 2003, Windows XP Professional, Windows Vista, Windows Server 2003 R2, Windows XP, Windows 7, Windows 2008 R2, Windows Developer Preview, Windows Server Developer Preview

Send comments about this topic to Microsoft.
Show:
© 2014 Microsoft