• Home
  • Raw
  • Download

Lines Matching +full:env +full:- +full:paths

10 use std::env;
18 fn is_valid(&self, path: &Path) -> bool; in is_valid()
22 fn has_separator(&self) -> bool; in has_separator()
24 fn to_absolute<P>(self, cwd: P) -> PathBuf in to_absolute()
30 fn has_separator(&self) -> bool { in has_separator()
34 fn to_absolute<P>(self, cwd: P) -> PathBuf in to_absolute()
51 pub fn new() -> Finder { in new()
58 paths: Option<U>, in find()
61 ) -> Result<impl Iterator<Item = PathBuf>> in find()
75 // Search binary in PATHs(defined in environment variable). in find()
76 let p = paths.ok_or(Error::CannotFindBinaryPath)?; in find()
77 let paths: Vec<_> = env::split_paths(&p).collect(); in find() localVariable
79 Either::Right(Self::path_search_candidates(path, paths).into_iter()) in find()
92 paths: Option<T>, in find_re()
94 ) -> Result<impl Iterator<Item = PathBuf>> in find_re()
98 let p = paths.ok_or(Error::CannotFindBinaryPath)?; in find_re()
100 // change the API to borrow on `paths`. in find_re()
102 let paths: Vec<_> = env::split_paths(&p).collect(); in find_re() localVariable
104 let matching_re = paths in find_re()
122 fn cwd_search_candidates<C>(binary_name: PathBuf, cwd: C) -> impl IntoIterator<Item = PathBuf> in cwd_search_candidates()
133 paths: P, in path_search_candidates()
134 ) -> impl IntoIterator<Item = PathBuf> in path_search_candidates()
138 let new_paths = paths.into_iter().map(move |p| p.join(binary_name.clone())); in path_search_candidates()
144 fn append_extension<P>(paths: P) -> impl IntoIterator<Item = PathBuf> in append_extension()
148 paths in append_extension()
152 fn append_extension<P>(paths: P) -> impl IntoIterator<Item = PathBuf> in append_extension()
163 env::var("PATHEXT") in append_extension()
182 paths in append_extension()
184 .flat_map(move |p| -> Box<dyn Iterator<Item = _>> { in append_extension()
190 // Appended paths with windows executable extensions. in append_extension()
214 fn correct_casing(mut p: PathBuf) -> PathBuf { in correct_casing()
230 fn correct_casing(p: PathBuf) -> PathBuf { in correct_casing()