gix_validate::path

Function component

source
pub fn component(
    input: &BStr,
    mode: Option<Mode>,
    _: Options,
) -> Result<&BStr, Error>
Expand description

Assure the given input resembles a valid name for a tree or blob, and in that sense, a path component. mode indicates the kind of input and it should be Some if input is the last component in the underlying path.

input must not make it possible to exit the repository, or to specify absolute paths.