/// Get user cache directory for Mango (multi-project).
/// Documented at https://docs.mangocode.org/en/latest/setup_guide/paths.html
Get user cache directory for Mango (multi-project).
Get user cache directory for Mango ( multi - project ) .
pub fn mango_user_cache_dir() -> PathBuf {
    let pth = env::var("MANGO_USER_CACHE_PATH")
        .map(PathBuf::from)
        .ok()
        .or_else(|| {
            cache_dir().map(|mut p| {
                p.push("mango");
                p
            })
        })
        .or_else(|| {
            home_dir().map(|mut p| {
                p.push(".mango");
                p.push("cache");
                p
            })
        })
        .unwrap_or_else(|| {
            let mut p = temp_dir();
            p.push("mango");
            p
        });
    create_dir_all(&pth).expect("could not create mango cache directory");
    pth
}
pub fn mango_user_cache_dir ( ) -> PathBuf { let pth = env :: var ( " " ) . map ( PathBuf :: from ) . ok ( ) . or_else ( | | { cache_dir ( ) . map ( | mut p | { p . push ( " " ) ; p } ) } ) . or_else ( | | { home_dir ( ) . map ( | mut p | { p . push ( " " ) ; p . push ( " " ) ; p } ) } ) . unwrap_or_else ( | | { let mut p = temp_dir ( ) ; p . push ( " " ) ; p } ) ; create_dir_all ( & pth ) . expect ( " " ) ; pth }
Get user cache directory for Mango (multi-project).
Get user cache directory for Mango ( multi - project ) .