This content is part of a third party extension that is not supported by the Cake project.
For more information about this extension see Cake.Issues.
Summary
Checks if a path is a sub path of another path.
The comparison is case-insensitive, handles
/
and \
slashes as folder separators and
only matches if the base dir folder name is matched exactly
(c:\foobar\file.txt
is not a sub path of c:\foo
).
- Assembly
- Cake
.Issues .dll - Namespace
- Cake
.Issues - Containing Type
- StringPathExtensions
Syntax
public static bool IsSubpathOf(this string path, string baseDirPath)
Parameters
Name | Type | Description |
---|---|---|
path | string | Full path which should be checked if it is a sub path. |
baseDirPath | string | Path for which should be checked if pathis a sub path of. |
Return Value
Type | Description |
---|---|
bool | Returns true if path starts with the path baseDirPath. |