Beispiel #1
0
        public static ulong GetFileInodeNumber(this FileInfo fileInfo)
        {
            if (fileInfo == null)
            {
                throw new ArgumentNullException("fileInfo");
            }

            return(EnvironmentHelper.RunningOnUnix ?
                   PosixHelper.GetFileInodeNum(fileInfo)
                                : WinAPIHelper.GetFileSystemIdFor(fileInfo));
        }
Beispiel #2
0
        public static ulong GetFileInodeNumber(this FileStream stream)
        {
            if (stream == null)
            {
                throw new ArgumentNullException("stream");
            }

            return(EnvironmentHelper.RunningOnUnix ?
                   PosixHelper.GetFileInodeNum(stream)
                                : WinAPIHelper.GetFileSystemIdFor(stream));
        }
Beispiel #3
0
 public static DateTime GetPreciseLastWriteTimeUtc(string path)
 {
     return(EnvironmentHelper.RunningOnUnix ?
            PosixHelper.GetPreciseLastWriteTimeUtc(path)
                         : File.GetLastWriteTimeUtc(path));
 }