Skip to main content

resolve_roots

Function resolve_roots 

Source
pub fn resolve_roots(
    list: &'static str,
    section: &'static str,
    entries: &PathList,
    renames: &BTreeMap<String, PathBuf>,
) -> Result<Vec<Root>, RootError>
Expand description

Builds the roots of a path list: checks that no entry is repeated or nested in another, names each entry (its last component, or its rename), and checks that names are unique.

list names the path list and section its configuration section, for error messages.

ยงErrors

Returns the first RootError found, in the order: repeated entries, nested entries, renames of unlisted directories, unnamed entries, duplicate names.