PathCodec with URI-encoded segments.
Returns the first named segment of the given path.
Rebases absolute paths onto the provided absolute directory, so
rebaseA(/baz)(/foo/bar) becomes /baz/foo/bar.
Sandboxes an absolute path, needed due to parsing functions producing unsandboxed paths.
Sandboxes an absolute path, needed due to parsing functions producing unsandboxed paths.
TODO[pathy]: We know this can't fail, remove once Pathy is refactored to be more precise
Removes the given prefix from an absolute path, if present.