fn count_flatpak(home: &Path) -> Option<usize> {
        let global_flatpak_dir = Path::new("/var/lib/flatpak/app");
        let user_flatpak_dir = home.join(".local/share/flatpak/app");

        match (read_dir(global_flatpak_dir), read_dir(user_flatpak_dir)) {
            (Ok(g), Ok(u)) => Some(g.count() + u.count()),
            (Ok(g), _) => Some(g.count()),
            (_, Ok(u)) => Some(u.count()),
            _ => None,
        }
    }
/// Returns the number of installed packages for systems
/// that have `flatpak` installed.
Returns the number of installed packages for systems
that have `flatpak` installed.
Returns the number of installed packages for systems that have ` flatpak ` installed .
fn count_flatpak(home: &Path) -> Option<usize> {
        let global_flatpak_dir = Path::new("/var/lib/flatpak/app");
        let user_flatpak_dir = home.join(".local/share/flatpak/app");
        match (read_dir(global_flatpak_dir), read_dir(user_flatpak_dir)) {
            (Ok(g), Ok(u)) => Some(g.count() + u.count()),
            (Ok(g), _) => Some(g.count()),
            (_, Ok(u)) => Some(u.count()),
            _ => None,
        }
    }
fn count_flatpak ( home : & Path ) -> Option < usize > { let global_flatpak_dir = Path :: new ( " " ) ; let user_flatpak_dir = home . join ( " " ) ; match ( read_dir ( global_flatpak_dir ) , read_dir ( user_flatpak_dir ) ) { ( Ok ( g ) , Ok ( u ) ) => Some ( g . count ( ) + u . count ( ) ) , ( Ok ( g ) , _ ) => Some ( g . count ( ) ) , ( _ , Ok ( u ) ) => Some ( u . count ( ) ) , _ => None , } }
Returns the number of installed packages for systems
that have `flatpak` installed.
Returns the number of installed packages for systems that have ` flatpak ` installed .
home
&Path
home
&Path