Repository navigation
What's New
PathWorks 2.1.0 is a correctness release. Path splitting, extension detection and NTFS checks now work on Unicode scalars, as file systems do, instead of on grapheme clusters, and the NTFS reserved-name list now matches Windows. No API is added or removed, but two fixes change results callers may notice, hence the minor bump.
Fixes
- Separators fused into graphemes: a
/combined with a combining mark or a prepended scalar (e.g. U+0600) was not treated as a separator, so..segments could hide inside one "name" andappendingPathComponentcould resolve outside its base.pathComponents,appendingPathComponent,removingLastPathComponent,intermediaryPathsandrelative(to:)now split and detect absolute paths by scalar. - Extensions:
separateExtensionfinds the period by scalar, so"x\u{600}.jpg"→("x\u{600}", "jpg"). - NTFS trailing characters and device names:
"a\u{600}."(ends in a period) and"CON.\u{301}txt"(device nameCON) are no longer reported safe. - More reserved names:
COM¹ COM² COM³ LPT¹ LPT² LPT³,CONIN$,CONOUT$, and spaces before the first period ("NUL .txt"→"_NUL_ .txt"), matching CPython'sntpath.isreserved.
Behavior changes
samePathandrelative(to:)compare components scalar by scalar: NFC"café"and NFD"café"are now different paths, as they are on NTFS and ext4."..".removingLastPathComponentis now"../.."(was""), anddirectoryBaseNameAndExtensionFromPathreturnsnilfor a path ending in...
Docs
- Corrected the
[String].pathseparator note and the NTFS truncation comment.