Skip to main content

Module path

Module path 

Source
Expand description

Target-syntax paths, target-path conversion, and well-known locations.

Path and PathBuf carry the path syntax (Kind) they were written in, so a path built for a Windows target keeps Windows semantics even when it is manipulated on a Unix host. They are the only path types that appear in this crate’s public API.

Knowing the syntax is also what lets the component accessors handle a Windows alternate data stream suffix (file.txt:zone:$DATA) as the two things it is — a file name and a StreamSpec — rather than as one opaque component. On a Unix path : is an ordinary filename character, so the stream accessors are all no-ops there.

Structs§

Component
One component of a Path.
Components
Iterator over the components of a Path.
Path
A borrowed path in a target’s syntax.
PathBuf
An owned path in a target’s syntax.
StreamSpec
A borrowed alternate data stream specifier.
StreamSpecBuf
An owned alternate data stream specifier.

Enums§

Kind
Path syntax used by a target.
WellKnownPath
A standard location resolved by a VFS target.
WindowsPrefix
Leading prefix of a Windows path.