Expand description

Modules

Structs

A dummy type to represent path specs and help finding all spots that take path specs once it is implemented. A preliminary version of a path-spec based on glances of the code.

The error type returned by into_bstr() and others may suffer from failed conversions from or to bytes.

Functions

Resolve relative components virtually without accessing the file system, e.g. turn a/./b/c/.././.. into a, without keeping intermediate .. and /a/../b/.. becomes /. Note that we might access the current_dir if we run out of path components to pop off. If unset, we continue which might lead to an invalid/uninteded path.

Similar to try_from_bstr(), but panics if malformed surrogates are encountered on windows.

Similar to try_from_bstring(), but will panic if there is ill-formed UTF-8 in the input.

Similar to try_from_byte_slice(), but will panic if there is ill-formed UTF-8 in the input.

Similar to try_into_bstr() but panics if malformed surrogates are encountered on windows.

Like into_bstr(), but takes OsStr as input for a lossless, but fallible, conversion.

Convert paths with slashes to backslashes on windows and do nothing on unix, but panics if malformed surrogates are encountered on windows.

Assures the given bytes use the native path separator.

Replaces windows path separators with slashes, unconditionally.

Replaces windows path separators with slashes, but only do so on windows.

Find backslashes and replace them with slashes, which typically resembles a unix path, unconditionally.

Similar to from_byte_slice(), but takes either borrowed or owned input.

Similar to try_from_bstr(), but takes and produces owned data.

Given input bytes, produce a Path from them ignoring encoding entirely if on unix.

Convert the given path either into its raw bytes on unix or its UTF8 encoded counterpart on windows.