97 references to Error
System.Private.CoreLib (97)
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (7)
118private readonly Error _error; 127internal ErrorInfo(Error error) 133internal Error Error 156internal static Error GetLastError() 197internal static partial Error ConvertErrorPlatformToPal(int platformErrno); 201internal static partial int ConvertErrorPalToPlatform(Error error); 219public static Interop.ErrorInfo Info(this Interop.Error error)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (15)
13Debug.Assert(errorInfo.Error != Error.SUCCESS); 14Debug.Assert(errorInfo.Error != Error.EINTR, "EINTR errors should be handled by the native shim and never bubble up to managed code"); 19internal static void CheckIo(Error error, string? path = null, bool isDirError = false) 21if (error != Interop.Error.SUCCESS) 120case Error.ENOENT: 129goto case Error.ENOTDIR; 131case Error.ENOTDIR: 136case Error.EACCES: 137case Error.EBADF: 138case Error.EPERM: 144case Error.ENAMETOOLONG: 149case Error.EWOULDBLOCK: 154case Error.ECANCELED: 157case Error.EFBIG: 160case Error.EEXIST:
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetCwd.cs (1)
63if (errorInfo.Error == Interop.Error.ERANGE)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetPwUid.cs (1)
86if (errorInfo.Error == Interop.Error.ERANGE)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.IsMemberOfGroup.cs (1)
38else if (rv == -1 && Interop.Sys.GetLastError() == Interop.Error.EINVAL)
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeFileHandle.Unix.cs (11)
104if (failForSymlink && error.Error == Interop.Error.ELOOP) 115if (error.Error == Interop.Error.EISDIR) 117error = Interop.Error.EACCES.Info(); 338throw Interop.GetExceptionForIoErrno(Interop.Error.EACCES.Info(), path); 367if (errorInfo.Error == Interop.Error.EWOULDBLOCK) 394if (error.Error == Interop.Error.ENOENT) 431if (errorInfo.Error != Interop.Error.EBADF && errorInfo.Error != Interop.Error.EINVAL) 446if (errorInfo.Error == Interop.Error.EFBIG || 447errorInfo.Error == Interop.Error.ENOSPC) 455throw new IOException(SR.Format(errorInfo.Error == Interop.Error.EFBIG
src\libraries\System.Private.CoreLib\src\System\Environment.UnixOrBrowser.cs (1)
66throw errno.Error == Interop.Error.EINVAL ?
src\libraries\System.Private.CoreLib\src\System\IO\Enumeration\FileSystemEnumerator.Unix.cs (5)
63=> info.Error == Interop.Error.ENOTDIR || info.Error == Interop.Error.ENOENT; 66=> info.Error == Interop.Error.EACCES || info.Error == Interop.Error.EBADF 67|| info.Error == Interop.Error.EPERM;
src\libraries\System.Private.CoreLib\src\System\IO\FileStatus.SetTimes.OtherUnix.cs (1)
22private static Interop.Error SetCreationTimeCore(SafeFileHandle? handle, string? path, long seconds, long nanoseconds) =>
src\libraries\System.Private.CoreLib\src\System\IO\FileStatus.Unix.cs (8)
438Interop.Error error = SetCreationTimeCore(handle, path, _fileCache.BirthTime, _fileCache.BirthTimeNsec); 439if (error != Interop.Error.SUCCESS && error != Interop.Error.ENOTSUP) 515case Interop.Error.ENOENT: 518case Interop.Error.ENOTDIR: 592Interop.Error error = _state == InitializedNotExistsNotADir ? Interop.Error.ENOTDIR : Interop.Error.ENOENT;
src\libraries\System.Private.CoreLib\src\System\IO\FileSystem.Unix.cs (36)
57if (error.Error == Interop.Error.EEXIST && DirectoryExists(path)) 90if (errorInfo.Error == Interop.Error.EXDEV || // rename fails across devices / mount points 91errorInfo.Error == Interop.Error.EACCES || 92errorInfo.Error == Interop.Error.EPERM || // permissions might not allow creating hard links even if a copy would work 93errorInfo.Error == Interop.Error.EOPNOTSUPP || // links aren't supported by the source file system 94errorInfo.Error == Interop.Error.EMLINK || // too many hard links to the source file 95errorInfo.Error == Interop.Error.ENOSYS) // the file system doesn't support link 103if (errorInfo.Error == Interop.Error.ENOENT) 114else if (errorInfo.Error == Interop.Error.EEXIST) 159if (errno.Error != Interop.Error.ENOENT) 175if (errno.Error == Interop.Error.ENOENT) 200if (errorInfo.Error == Interop.Error.EXDEV) // rename fails across devices / mount points 248case Interop.Error.ENOENT: 257case Interop.Error.EROFS: 266fileExistsError.Error == Interop.Error.ENOENT) 271case Interop.Error.EISDIR: 272errorInfo = Interop.Error.EACCES.Info(); 305if (errorInfo.Error == Interop.Error.EEXIST && DirectoryExists(fullPath)) 309else if (errorInfo.Error == Interop.Error.ENOENT) // Some parts of the path don't exist yet. 349if (errorInfo.Error == Interop.Error.ENOENT) 357else if (errorInfo.Error == Interop.Error.EEXIST) 379if (errorInfo.Error == Interop.Error.EEXIST) 456case Interop.Error.EACCES: // match Win32 exception 458case Interop.Error.ENOENT: 460case Interop.Error.ENOTDIR: // sourceFullPath exists and it's not a directory 533if (errorInfo.Error == Interop.Error.ENOTEMPTY) 540else if (errorInfo.Error == Interop.Error.ENOENT) 551if (topLevel && errorInfo.Error == Interop.Error.ENOTDIR) 557else if (existErr.Error == Interop.Error.ENOENT) 563if (errorInfo.Error == Interop.Error.EACCES || 564errorInfo.Error == Interop.Error.EPERM || 565errorInfo.Error == Interop.Error.EROFS) 589throw Interop.GetExceptionForIoErrno(new Interop.ErrorInfo(Interop.Error.ENOENT), fullPath); 608throw Interop.GetExceptionForIoErrno(new Interop.ErrorInfo(Interop.Error.ENOENT), fullPath); 681Interop.Error error = Interop.Sys.GetLastError(); 683if (error == Interop.Error.EINVAL)
src\libraries\System.Private.CoreLib\src\System\IO\PersistedFiles.Unix.cs (1)
119if (errorInfo.Error == Interop.Error.ERANGE)
src\libraries\System.Private.CoreLib\src\System\IO\RandomAccess.Unix.cs (4)
43if (errorInfo.Error == Interop.Error.ENXIO || 44errorInfo.Error == Interop.Error.ESPIPE) 120if (errorInfo.Error == Interop.Error.ENXIO || 121errorInfo.Error == Interop.Error.ESPIPE)
src\libraries\System.Private.CoreLib\src\System\IO\Strategies\FileStreamHelpers.Unix.cs (5)
24if (!(ignoreNotSupported && errorInfo.Error == Interop.Error.ENOTSUP)) 37throw Interop.GetExceptionForIoErrno(new Interop.ErrorInfo(Interop.Error.EINVAL), handle.Path); 47case Interop.Error.EROFS: 48case Interop.Error.EINVAL: 49case Interop.Error.ENOTSUP: