Function nu_engine::glob_from

source ·
pub fn glob_from(
    pattern: &Spanned<String>,
    cwd: &Path,
    span: Span,
    options: Option<MatchOptions>
) -> Result<(Option<PathBuf>, Box<dyn Iterator<Item = Result<PathBuf, ShellError>> + Send>), ShellError>
Expand description

This function is like nu_glob::glob from the glob crate, except it is relative to a given cwd.

It returns a tuple of two values: the first is an optional prefix that the expanded filenames share. This prefix can be removed from the front of each value to give an approximation of the relative path to the user

The second of the two values is an iterator over the matching filepaths.