System.IO.DriveInfo.CheckStatfsResultAndThrowIfNecessary C# (CSharp) Method

CheckStatfsResultAndThrowIfNecessary() private method

private CheckStatfsResultAndThrowIfNecessary ( int result ) : void
result int
return void
        private void CheckStatfsResultAndThrowIfNecessary(int result)
        {
            if (result != 0)
            {
                var errorInfo = Interop.Sys.GetLastErrorInfo();
                if (errorInfo.Error == Interop.Error.ENOENT)
                {
                    throw new DriveNotFoundException(SR.Format(SR.IO_DriveNotFound_Drive, Name)); // match Win32
                }
                else
                {
                    throw Interop.GetExceptionForIoErrno(errorInfo, isDirectory: true);
                }
            }
        }
    }