Click or drag to resize

PathCollectionIsSubPathOf Method

Checks if a given path is a parent path of the other given path.

Namespace:  Jam.Shell
Assembly:  ShellBrowser.Core (in ShellBrowser.Core.dll) Version: 6.3.1
Syntax
public static bool IsSubPathOf(
	string p_SuperiorPath,
	string p_PossibleSubPath
)

Parameters

p_SuperiorPath
Type: SystemString
The possible parent (superior) path.
p_PossibleSubPath
Type: SystemString
A path for that should be checked if it is a sub-path of p_SuperiorPath.

Return Value

Type: Boolean
true if p_SuperiorPath is a prent path of p_PossibleSubPath.
Remarks
p_SuperiorPath does not necessarily need to ba a direct parent of p_PossibleSubPath
Examples

PathCollection.IsSubPathOf(@"C:\", @"C:\Windows\System32")
returns true.

PathCollection.IsSubPathOf(@"C:\Temp", @"C:\Windows\System32")
returns false.

See Also