pub fn from_creation_time(meta: &fs::Metadata) -> Option<FileTime> {
        macro_rules! birthtim {
            ($(($e:expr, $i:ident)),*) => {
                #[cfg(any($(target_os = $e),*))]
                fn imp(meta: &fs::Metadata) -> Option<FileTime> {
                    $(
                        #[cfg(target_os = $e)]
                        use std::os::$i::fs::MetadataExt;
                    )*
                    let raw = meta.as_raw_stat();
                    Some(FileTime::from_os_repr(raw.st_birthtime as u64,
                                                raw.st_birthtime_nsec as u32))
                }

                #[cfg(all(not(windows),
                          $(not(target_os = $e)),*))]
                fn imp(_meta: &fs::Metadata) -> Option<FileTime> {
                    None
                }
            }
        }

        birthtim! {
            ("bitrig", bitrig),
            ("freebsd", freebsd),
            ("ios", ios),
            ("macos", macos),
            ("openbsd", openbsd)
        }

        #[cfg(windows)]
        fn imp(meta: &fs::Metadata) -> Option<FileTime> {
            Some(FileTime::from_os_repr(meta.last_access_time()))
        }
        imp(meta)
    }
/// Creates a new timestamp from the creation time listed in the specified
/// metadata.
///
/// The returned value corresponds to the `birthtime` field of `stat` on
/// Unix platforms and the `ftCreationTime` field on Windows platforms. Note
/// that not all Unix platforms have this field available and may return
/// `None` in some circumstances.
Creates a new timestamp from the creation time listed in the specified
metadata.


Creates a new timestamp from the creation time listed in the specified metadata .
pub fn from_creation_time(meta: &fs::Metadata) -> Option<FileTime> {
        macro_rules! birthtim {
            ($(($e:expr, $i:ident)),*) => {
                #[cfg(any($(target_os = $e),*))]
                fn imp(meta: &fs::Metadata) -> Option<FileTime> {
                    $(
                        #[cfg(target_os = $e)]
                        use std::os::$i::fs::MetadataExt;
                    )*
                    let raw = meta.as_raw_stat();
                    Some(FileTime::from_os_repr(raw.st_birthtime as u64,
                                                raw.st_birthtime_nsec as u32))
                }
                #[cfg(all(not(windows),
                          $(not(target_os = $e)),*))]
                fn imp(_meta: &fs::Metadata) -> Option<FileTime> {
                    None
                }
            }
        }
        birthtim! {
            ("bitrig", bitrig),
            ("freebsd", freebsd),
            ("ios", ios),
            ("macos", macos),
            ("openbsd", openbsd)
        }
        #[cfg(windows)]
        fn imp(meta: &fs::Metadata) -> Option<FileTime> {
            Some(FileTime::from_os_repr(meta.last_access_time()))
        }
        imp(meta)
    }
pub fn from_creation_time ( meta : & fs :: Metadata ) -> Option < FileTime > { macro_rules! birthtim { ( $ ( ( $e : expr $i : ident ) ) * ) => { [ cfg ( any ( $ ( target_os $e ) * ) ) ] fn imp ( meta fs Metadata ) Option FileTime { $ ( [ cfg ( target_os $e ) ] use std os $i fs MetadataExt ) * let raw meta as_raw_stat ( ) Some ( FileTime from_os_repr ( raw st_birthtime as u64 raw st_birthtime_nsec as u32 ) ) } [ cfg ( all ( not ( windows ) $ ( not ( target_os $e ) ) * ) ) ] fn imp ( _meta fs Metadata ) Option FileTime { None } } } birthtim ! { ( " " bitrig ) ( " " freebsd ) ( " " ios ) ( " " macos ) ( " " openbsd ) } # [ cfg ( windows ) ] fn imp ( meta : & fs :: Metadata ) -> Option < FileTime > { Some ( FileTime :: from_os_repr ( meta . last_access_time ( ) ) ) } imp ( meta ) }
Creates a new timestamp from the creation time listed in the specified
metadata.
Creates a new timestamp from the creation time listed in the specified metadata .
meta
&fs::Metadata
meta
&fs::Metadata