Crate scolapasta_path

Source
Expand description

Functions for working with file system paths and loading Ruby source code.

§Examples

assert!(is_explicit_relative("./test/loader"));
assert!(is_explicit_relative("../rake/test_task"));

assert!(!is_explicit_relative("json/pure"));
assert!(!is_explicit_relative("/artichoke/src/json/pure"));

Structs§

ConvertBytesError
Error returned when a platform string cannot be converted to bytes or bytes cannot be converted to a platform string.

Functions§

absolutize_relative_to
Translate a relative path into an absolute path, using a secondary path as the frame of reference.
bytes_to_os_str
Convert a byte slice to a platform-specific OsStr.
bytes_to_os_string
Convert a byte vec to a platform-specific OsString.
is_explicit_relative
Return whether the given path starts with an explicit relative path.
is_explicit_relative_bytes
Return whether the given byte string to treat as a path starts with an explicit relative path.
memory_loader_ruby_load_path
Directory at which Ruby sources and extensions are stored in the virtual file system.
normalize_slashes
Normalize path separators to all be /.
os_str_to_bytes
Convert a platform-specific OsStr to a byte slice.
os_string_to_bytes
Convert a platform-specific OsString to a byte vec.