Platform-independent lexical path with / separators.Roots are stored separately so POSIX normalization cannot collapse UNC'sleading // or mistake C:/ for a relative path. Absolute paths clamp ..at the root; relative paths retain leading ... Windows verbatim pathspreserve their components without normalization. An empty relative portiondenotes the root, or . without a root. Components retain literal backslashes.This type does not access the filesystem or resolve symlinks.It does not validate filesystem names; preserving verbatim components doesnot make otherwise invalid names valid.See Linux filename rulesand path resolution.
Render the uniform path, retaining //?/ for Windows verbatim namespaces.Relative paths with a drive-like first componentretain ./ to distinguish component names from drive roots.A POSIX component can contain :, and . denotes the current directory:filename rules,path resolution.
Parse uniform syntax with / separators, preserving literal backslashes.Roots use /, C:/, C:, //server/share/, or Windows //?/ syntax;drive letters are ASCII. Verbatim paths preserve their components.Three or more leading slashes denote a POSIX root.Use from_windows to parse Windows separators explicitly.
Parse Windows drive, UNC, or relative syntax and convert its separators to/ before entering the uniform representation. Extended paths beginningwith \\?\ bypass normalization and retain their namespace.Dot segments, trailing separators, spaces, and periods are preserved.For example, \\?\D:\folder becomes //?/D:/folder, and\\?\UNC\server\share\folder becomes //?/UNC/server/share/folder.See Windows naming rules.
Append the relative portion of another path, preserving thispath's root. The other path's root is ignored. Verbatim roots append theparsed components without further normalization.A nonempty child adds a root separator if the verbatim base lacks one.
Resolve another path against this explicit base without reading the hostenvironment. Absolute POSIX, drive, UNC, and verbatim paths replace the base;ordinary relative paths are joined to it. The result can remain relative.Leading .. components in relative inputs walk the base's parents evenwhen the base is verbatim; the base's remaining components are preserved.For example, resolving ../b against //?/D:/a produces //?/D:/b.Parent traversal stops at the drive or UNC share root.A drive-relative path is joined to a base on the same drive, comparing driveletters without case sensitivity and preserving the base's root.Raises ResolveError::DriveBaseRequired when that drive base is unavailable.
Render according to the stored root, without consulting the host platform.Drive, drive-relative, UNC, and verbatim paths use Windows separators;POSIX and relative paths retain / and literal backslashes. This does notmake a foreign path accessible on the host. Use to_string for uniformprotocol strings and to_windows to explicitly request Windows syntax.Verbatim components and the root separator are preserved without normalization.
Render a Windows path for native filesystem APIs, including the backslashesrequired by extended paths. Use to_string for the uniform wire format.Do not pass uniform //?/ paths directly to native Windows file APIs.The root separator is preserved: \\?\Volume{GUID} names the volume,while \\?\Volume{GUID}\ names its root directory.This converts separators; it does not validate Windows filename rules.See Windows volume namingand extended-path rules.