Module std::old_path::windowsUnstable [-] [+] [src]

Windows file path handling

Structs

ParsePathError

Value indicating that a path could not be parsed from a string.

Path

Represents a Windows path

Enums

PathPrefix

Prefix types for Path

Constants

SEP

The standard path separator character

SEP2

The alternative path separator character

SEP2_BYTE

The alternative path separator character

SEP_BYTE

The standard path separator byte

Functions

is_cwd_relative

Returns whether the path is considered "cwd-relative", which means a path with a volume prefix that is not absolute. This look like "C:foo.txt". Paths of this form are relative to the cwd on the given volume.

is_sep

Returns whether the given char is a path separator. Allows both the primary separator '\' and the alternative separator '/'.

is_sep_byte

Returns whether the given byte is a path separator. Allows both the primary separator '\' and the alternative separator '/'.

is_sep_byte_verbatim

Returns whether the given byte is a path separator. Only allows the primary separator '\'; use is_sep_byte to allow '/'.

is_sep_verbatim

Returns whether the given char is a path separator. Only allows the primary separator '\'; use is_sep to allow '/'.

is_verbatim

Returns whether the Path's prefix is a verbatim prefix, i.e. \\?\

is_vol_relative

Returns whether the path is considered "volume-relative", which means a path that looks like "\foo". Paths of this form are relative to the current volume, but absolute within that volume.

make_non_verbatim

Returns the non-verbatim equivalent of the input path, if possible. If the input path is a device namespace path, None is returned. If the input path is not verbatim, it is returned as-is. If the input path is verbatim, but the same path can be expressed as non-verbatim, the non-verbatim version is returned. Otherwise, None is returned.

prefix

Returns the PathPrefix for this Path

Type Definitions

Components

Iterator that yields successive components of a Path as &[u8]

StrComponents

Iterator that yields successive components of a Path as &str