Module path_helpers

Source
Expand description

Collection of path-related helpers.

Functions§

build_root
Path to the build directory root.
cwd
Return the current working directory.
filename_contains
Returns true if the filename at path contains needle.
filename_not_in_denylist
Returns true if the filename at path is not in expected.
has_extension
Returns true if the filename at path has the extension extension.
has_prefix
Returns true if the filename at path starts with prefix.
has_suffix
Returns true if the filename at path ends with suffix.
not_contains
Returns true if the filename at path does not contain expected.
path
Construct a PathBuf relative to the current working directory by joining cwd() with the relative path. This is mostly a convenience helper so the test writer does not need to write PathBuf::from(path_like_string).
read_dir_entries_recursive
Helper for reading entries in a given directory and its children.
shallow_find_directories
Browse the directory path non-recursively and return all directories which respect the parameters outlined by closure.
shallow_find_files
Browse the directory path non-recursively and return all files which respect the parameters outlined by closure.
source_root
Path to the root rust-lang/rust source checkout.