示例#1
0
        static FileInfoHelper()
        {
#if NETCF
            Helper = new GenericFileInfoHelper();
#else
            if (PlatformDetector.IsCurrentOSCompatibleWith(RuntimeOS.Windows) ||
                PlatformDetector.IsCurrentOSCompatibleWith(RuntimeOS.WindowsNT))
            {
                Helper = new Win32FileInfoHelper();
            }
            else
            {
                Helper = new GenericFileInfoHelper();
            }
#endif
        }
示例#2
0
 public static DateTime LookupValidFileCreationTimeUtc(this FileInfo fileInfo)
 {
     return(FileInfoHelper.LookupValidFileCreationTimeUtc(fileInfo, (f) => f.GetCreationTimeUtc(), (f) => f.GetLastWriteTimeUtc()).Value);
 }