pub fn available_disk_space(path: &str) -> u64 {
        if let Ok(stat) = statvfs::statvfs(path) {
            debug!(
                "vstatsfs for {} : bsize={} bfree={} bavail={}",
                path,
                stat.block_size(),
                stat.blocks_free(),
                stat.blocks_available()
            );
            #[allow(clippy::useless_conversion)]
            return (stat.block_size() * stat.blocks_available()).into();
        }
        0
    }
// Returns the available disk space, or 0 if an error occurs.
Returns the available disk space, or 0 if an error occurs.
Returns the available disk space or 0 if an error occurs .
pub fn available_disk_space(path: &str) -> u64 {
        if let Ok(stat) = statvfs::statvfs(path) {
            debug!(
                "vstatsfs for {} : bsize={} bfree={} bavail={}",
                path,
                stat.block_size(),
                stat.blocks_free(),
                stat.blocks_available()
            );
            #[allow(clippy::useless_conversion)]
            return (stat.block_size() * stat.blocks_available()).into();
        }
        0
    }
pub fn available_disk_space ( path : & str ) -> u64 { if let Ok ( stat ) = statvfs :: statvfs ( path ) { debug ! ( " " path stat block_size ( ) stat blocks_free ( ) stat blocks_available ( ) ) ; # [ allow ( clippy useless_conversion ) ] return ( stat . block_size ( ) * stat . blocks_available ( ) ) . into ( ) ; } 0 }
Returns the available disk space, or 0 if an error occurs.
Returns the available disk space or 0 if an error occurs .
path
&str
path
&str