Lines Matching refs:path
6 use std::path::{Path, PathBuf};
15 fn parse_elf_header(path: &Path) -> io::Result<u8> {
16 let mut file = File::open(path)?;
27 fn parse_pe_header(path: &Path) -> io::Result<u16> {
28 let mut file = File::open(path)?;
52 fn validate_library(path: &Path) -> Result<(), String> {
54 let class = parse_elf_header(path).map_err(|e| e.to_string())?;
66 let magic = parse_pe_header(path).map_err(|e| e.to_string())?;
146 let path = directory.join(&filename);
147 match validate_library(&path) {
152 Err(message) => invalid.push(format!("({}: {})", path.display(), message)),
162 `LIBCLANG_PATH` environment variable to a path where one of these files \
196 .map(|(path, filename, _)| (path, filename))