public startsWith(base as Object) as Boolean:
Returns true when this path starts with the same complete path components as the supplied base path.
Both operands are converted to normalized absolute paths before the comparison. On Windows, path component case is ignored. A textual sibling such as /tmp/base-other therefore does not start with /tmp/base.
| Parameter | Description |
|---|---|
base | Base path supplied as a Path, String, or path-like object. |
True when every component of base is a leading component of this path.
import klyn.io
base = FolderPath("/tmp/base")
assert FilePath(base, "file.txt").startsWith(base)
assert not FilePath("/tmp/base-other/file.txt").startsWith(base)