RelativePath
Represents a relative file system path. A relative path never starts with a /
character, and holds a normalized string representation. As with AbsolutePath, the normalization is strictly syntactic, and does not access the file system in any way.
struct RelativePath
The relative path string is normalized by:
Collapsing
..
path components that aren’t at the beginningRemoving extraneous
.
path componentsRemoving any trailing path separator
Removing any redundant path separators
Replacing a completely empty path with a
.
This string manipulation may change the meaning of a path if any of the path components are symbolic links on disk. However, the file system is never accessed in any way when initializing a RelativePath.