Crate relative_path [] [src]

A platform-neutral relative path.

This provide types which are analogous to Path, and PathBuf found in stdlib, with the following characteristics:

  • The path separator is set to a fixed character (/), regardless of platform.
  • Relative paths cannot represent an absolute path in the filesystem, without first specifying what they are relative to through to_path.

Serde Support

This library includes serde support that can be enabled with the serde feature.

Structs

Components

Iterator over all the components in a relative path.

Display

Helper struct for printing relative paths.

Iter

An iterator over the Components of a RelativePath, as str slices.

RelativePath

A borrowed, immutable relative path.

RelativePathBuf

An owned, mutable relative path.

StripPrefixError

An error returned from RelativePath::strip_prefix if the prefix was not found.

Enums

Component