Module sgx_tstd::path [−][src]
Cross-platform path manipulation.
This module provides two types, PathBuf
and Path
Path
(akin to String
and str
), for working with paths abstractly. These types are thin wrappers
around OsString
and OsStr
respectively, meaning that they work directly
on strings according to the local platform's path syntax.
Paths can be parsed into Component
s by iterating over the structure
returned by the [components
] method on Path
. Component
s roughly
correspond to the substrings between path separators (/
or \
). You can
reconstruct an equivalent path from components with the [push
] method on
PathBuf
; note that the paths may differ syntactically by the
normalization described in the documentation for the [components
] method.
Structs
Ancestors |
An iterator over |
Components | |
Display |
Helper struct for safely printing paths with [ |
Iter | |
Path |
A slice of a path (akin to |
PathBuf |
An owned, mutable path (akin to |
PrefixComponent |
A structure wrapping a Windows path prefix as well as its unparsed string representation. |
StripPrefixError |
An error returned from |
Enums
Component |
A single component of a path. |
ParsePathError |
Error returned from [ |
Prefix |
Windows path prefixes, e.g. |
Constants
MAIN_SEPARATOR |
The primary separator of path components for the current platform. |
Functions
is_separator |
Determines whether the character is one of the permitted path separators for the current platform. |