Skip to main content

find_case_insensitive_file

Function find_case_insensitive_file 

Source
pub fn find_case_insensitive_file(
    directory: &Path,
    expected_file_name: &str,
) -> Result<Option<PathBuf>>
Expand description

Finds one file in directory with ASCII case-insensitive name matching.

Where several entries differ only by case this takes a deterministic winner: the first of find_case_insensitive_files. A caller that should report rather than resolve wants that one instead.

ยงErrors

Propagates the io::Error from reading directory or one of its entries. A directory that exists and holds no match is Ok(None).