fn fuse_attr_from_attr(attr: &FileAttr) -> fuse_attr {
    // FIXME: unwrap may panic, use unwrap_or((0, 0)) or return a result instead?
    let (atime_secs, atime_nanos) = time_from_system_time(&attr.atime).unwrap();
    let (mtime_secs, mtime_nanos) = time_from_system_time(&attr.mtime).unwrap();
    let (ctime_secs, ctime_nanos) = time_from_system_time(&attr.ctime).unwrap();
    #[cfg(target_os = "macos")]
    let (crtime_secs, crtime_nanos) = time_from_system_time(&attr.crtime).unwrap();

    fuse_attr {
        ino: attr.ino,
        size: attr.size,
        blocks: attr.blocks,
        atime: atime_secs,
        mtime: mtime_secs,
        ctime: ctime_secs,
        #[cfg(target_os = "macos")]
        crtime: crtime_secs,
        atimensec: atime_nanos,
        mtimensec: mtime_nanos,
        ctimensec: ctime_nanos,
        #[cfg(target_os = "macos")]
        crtimensec: crtime_nanos,
        mode: mode_from_type_and_perm(attr.ftype, attr.perm),
        nlink: attr.nlink,
        uid: attr.uid,
        gid: attr.gid,
        rdev: attr.rdev,
        #[cfg(target_os = "macos")]
        flags: attr.flags,
    }
}
/// Create a fuse_attr from a given FileAttr.
Create a fuse_attr from a given FileAttr.
Create a fuse_attr from a given FileAttr .
fn fuse_attr_from_attr(attr: &FileAttr) -> fuse_attr {
    // FIXME: unwrap may panic, use unwrap_or((0, 0)) or return a result instead?
    let (atime_secs, atime_nanos) = time_from_system_time(&attr.atime).unwrap();
    let (mtime_secs, mtime_nanos) = time_from_system_time(&attr.mtime).unwrap();
    let (ctime_secs, ctime_nanos) = time_from_system_time(&attr.ctime).unwrap();
    #[cfg(target_os = "macos")]
    let (crtime_secs, crtime_nanos) = time_from_system_time(&attr.crtime).unwrap();
    fuse_attr {
        ino: attr.ino,
        size: attr.size,
        blocks: attr.blocks,
        atime: atime_secs,
        mtime: mtime_secs,
        ctime: ctime_secs,
        #[cfg(target_os = "macos")]
        crtime: crtime_secs,
        atimensec: atime_nanos,
        mtimensec: mtime_nanos,
        ctimensec: ctime_nanos,
        #[cfg(target_os = "macos")]
        crtimensec: crtime_nanos,
        mode: mode_from_type_and_perm(attr.ftype, attr.perm),
        nlink: attr.nlink,
        uid: attr.uid,
        gid: attr.gid,
        rdev: attr.rdev,
        #[cfg(target_os = "macos")]
        flags: attr.flags,
    }
}
fn fuse_attr_from_attr ( attr : & FileAttr ) -> fuse_attr { // FIXME: unwrap may panic, use unwrap_or((0, 0)) or return a result instead? let ( atime_secs , atime_nanos ) = time_from_system_time ( & attr . atime ) . unwrap ( ) ; let ( mtime_secs , mtime_nanos ) = time_from_system_time ( & attr . mtime ) . unwrap ( ) ; let ( ctime_secs , ctime_nanos ) = time_from_system_time ( & attr . ctime ) . unwrap ( ) ; # [ cfg ( target_os " " ) ] let ( crtime_secs , crtime_nanos ) = time_from_system_time ( & attr . crtime ) . unwrap ( ) ; fuse_attr { ino : attr . ino , size : attr . size , blocks : attr . blocks , atime : atime_secs , mtime : mtime_secs , ctime : ctime_secs , # [ cfg ( target_os " " ) ] crtime : crtime_secs , atimensec : atime_nanos , mtimensec : mtime_nanos , ctimensec : ctime_nanos , # [ cfg ( target_os " " ) ] crtimensec : crtime_nanos , mode : mode_from_type_and_perm ( attr . ftype , attr . perm ) , nlink : attr . nlink , uid : attr . uid , gid : attr . gid , rdev : attr . rdev , # [ cfg ( target_os " " ) ] flags : attr . flags , } }
Create a fuse_attr from a given FileAttr.
Create a fuse_attr from a given FileAttr .
attr
&FileAttr
attr
&FileAttr