MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / find_latest_from_cache

Function find_latest_from_cache

rust/src/files.rs:698–708  ·  view source on GitHub ↗
(
    cache_path: &PathBuf,
    filter: F,
)

Source from the content-addressed store, hash-verified

696}
697
698pub fn find_latest_from_cache<F: Fn(&DirEntry) -> bool>(
699 cache_path: &PathBuf,
700 filter: F,
701) -> Result<Option<PathBuf>, Error> {
702 let files_in_cache = collect_files_from_cache(cache_path, filter);
703 if !files_in_cache.is_empty() {
704 Ok(Some(files_in_cache.iter().last().unwrap().to_owned()))
705 } else {
706 Ok(None)
707 }
708}
709
710pub fn capitalize(s: &str) -> String {
711 let mut chars = s.chars();

Calls 2

collect_files_from_cacheFunction · 0.85
is_emptyMethod · 0.80