fn find_page_for_platform(
        page_name: &str,
        cache_dir: &Path,
        platform: &str,
        language_dirs: &[String],
    ) -> Option<PathBuf> {
        language_dirs
            .iter()
            .map(|lang_dir| cache_dir.join(lang_dir).join(platform).join(page_name))
            .find(|path| path.exists() && path.is_file())
    }
/// Check for pages for a given platform in one of the given languages.
Check for pages for a given platform in one of the given languages.
Check for pages for a given platform in one of the given languages .
fn find_page_for_platform(
        page_name: &str,
        cache_dir: &Path,
        platform: &str,
        language_dirs: &[String],
    ) -> Option<PathBuf> {
        language_dirs
            .iter()
            .map(|lang_dir| cache_dir.join(lang_dir).join(platform).join(page_name))
            .find(|path| path.exists() && path.is_file())
    }
fn find_page_for_platform ( page_name : & str , cache_dir : & Path , platform : & str , language_dirs : & [ String ] , ) -> Option < PathBuf > { language_dirs . iter ( ) . map ( | lang_dir | cache_dir . join ( lang_dir ) . join ( platform ) . join ( page_name ) ) . find ( | path | path . exists ( ) && path . is_file ( ) ) }
Check for pages for a given platform in one of the given languages.
Check for pages for a given platform in one of the given languages .
page_name
&str
cache_dir
&Path
platform
&str
language_dirs
&[String]
page_name
&str
cache_dir
&Path
platform
&str
language_dirs
&[String]