NavigationCmdletProvider.GetParentPath
Method
Definition
Removes the child segment of a path and returns the remaining parent portion.
protected virtual string GetParentPath (string path, string root);
- 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.
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 "\".