示例#1
0
        public static ulong GetFileInodeNumber(this FileStream stream)
        {
            if (stream == null)
            {
                throw new ArgumentNullException("stream");
            }

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

            return(EnvironmentHelper.RunningOnUnix ?
                   PosixHelper.GetFileInodeNum(fileInfo)
                                : WinAPIHelper.GetFileSystemIdFor(fileInfo));
        }