Esempio n. 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));
        }
Esempio n. 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));
        }