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: 7.2
Syntax
public static bool IsSubPathOf(
	string p_SuperiorPath,
	string p_PossibleSubPath
)

Parameters

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

Return Value

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
Example

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

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

See Also