/// Returns file information for the given path.
/// On failure, logs an error to stderr and returns `None`.
Returns file information for the given path.
On failure, logs an error to stderr and returns `None`.
Returns file information for the given path . On failure logs an error to stderr and returns ` None ` .
pub(crate) fn file_info_or_log_err(
    file: Path,
    devices: &DiskDevices,
    log: &Log,
) -> Option<FileInfo> {
    match FileInfo::new(file, devices) {
        Ok(info) => Some(info),
        Err(e) if e.kind() == ErrorKind::NotFound => None,
        Err(e) => {
            log.warn(e);
            None
        }
    }
}
pub ( crate ) fn file_info_or_log_err ( file : Path , devices : & DiskDevices , log : & Log , ) -> Option < FileInfo > { match FileInfo :: new ( file , devices ) { Ok ( info ) => Some ( info ) , Err ( e ) if e . kind ( ) == ErrorKind :: NotFound => None , Err ( e ) => { log . warn ( e ) ; None } } }
Returns file information for the given path.
Returns file information for the given path .
file
Path
devices
&DiskDevices
log
&Log