101 references to Error
System.Private.CoreLib (101)
src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcMountInfo.cs (4)
14internal static Error GetFileSystemTypeForRealPath(string path, out string format) 61return Error.SUCCESS; 63return Error.ENOENT; 71return Error.ENOTSUP;
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)
67throw errno.Error == Interop.Error.EINVAL ?
src\libraries\System.Private.CoreLib\src\System\IO\Enumeration\FileSystemEnumerator.Unix.cs (5)
59=> info.Error == Interop.Error.ENOTDIR || info.Error == Interop.Error.ENOENT; 62=> info.Error == Interop.Error.EACCES || info.Error == Interop.Error.EBADF 63|| 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: 590Interop.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)) 88if (errorInfo.Error == Interop.Error.EXDEV || // rename fails across devices / mount points 89errorInfo.Error == Interop.Error.EACCES || 90errorInfo.Error == Interop.Error.EPERM || // permissions might not allow creating hard links even if a copy would work 91errorInfo.Error == Interop.Error.EOPNOTSUPP || // links aren't supported by the source file system 92errorInfo.Error == Interop.Error.EMLINK || // too many hard links to the source file 93errorInfo.Error == Interop.Error.ENOSYS) // the file system doesn't support link 101if (errorInfo.Error == Interop.Error.ENOENT) 112else if (errorInfo.Error == Interop.Error.EEXIST) 157if (errno.Error != Interop.Error.ENOENT) 173if (errno.Error == Interop.Error.ENOENT) 198if (errorInfo.Error == Interop.Error.EXDEV) // rename fails across devices / mount points 246case Interop.Error.ENOENT: 255case Interop.Error.EROFS: 264fileExistsError.Error == Interop.Error.ENOENT) 269case Interop.Error.EISDIR: 270errorInfo = Interop.Error.EACCES.Info(); 303if (errorInfo.Error == Interop.Error.EEXIST && DirectoryExists(fullPath)) 307else if (errorInfo.Error == Interop.Error.ENOENT) // Some parts of the path don't exist yet. 347if (errorInfo.Error == Interop.Error.ENOENT) 355else if (errorInfo.Error == Interop.Error.EEXIST) 377if (errorInfo.Error == Interop.Error.EEXIST) 454case Interop.Error.EACCES: // match Win32 exception 456case Interop.Error.ENOENT: 458case Interop.Error.ENOTDIR: // sourceFullPath exists and it's not a directory 531if (errorInfo.Error == Interop.Error.ENOTEMPTY) 538else if (errorInfo.Error == Interop.Error.ENOENT) 549if (topLevel && errorInfo.Error == Interop.Error.ENOTDIR) 555else if (existErr.Error == Interop.Error.ENOENT) 561if (errorInfo.Error == Interop.Error.EACCES || 562errorInfo.Error == Interop.Error.EPERM || 563errorInfo.Error == Interop.Error.EROFS) 587throw Interop.GetExceptionForIoErrno(new Interop.ErrorInfo(Interop.Error.ENOENT), fullPath); 606throw Interop.GetExceptionForIoErrno(new Interop.ErrorInfo(Interop.Error.ENOENT), fullPath); 679Interop.Error error = Interop.Sys.GetLastError(); 681if (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: