117 references to Error
System.Private.CoreLib (117)
_generated\2\LibraryImports.g.cs (2)
1961
internal static extern partial global::Interop.
Error
ConvertErrorPlatformToPal(int platformErrno);
1969
internal static extern partial int ConvertErrorPalToPlatform(global::Interop.
Error
error);
src\runtime\src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcMountInfo.cs (4)
14
internal static
Error
GetFileSystemTypeForRealPath(string path, out string format)
61
return
Error
.SUCCESS;
63
return
Error
.ENOENT;
71
return
Error
.ENOTSUP;
src\runtime\src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (7)
119
private readonly
Error
_error;
128
internal ErrorInfo(
Error
error)
134
internal
Error
Error
157
internal static
Error
GetLastError()
198
internal static partial
Error
ConvertErrorPlatformToPal(int platformErrno);
202
internal static partial int ConvertErrorPalToPlatform(
Error
error);
220
public static Interop.ErrorInfo Info(this Interop.
Error
error)
src\runtime\src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (15)
13
Debug.Assert(errorInfo.Error !=
Error
.SUCCESS);
14
Debug.Assert(errorInfo.Error !=
Error
.EINTR, "EINTR errors should be handled by the native shim and never bubble up to managed code");
19
internal static void CheckIo(
Error
error, string? path = null, bool isDirError = false)
21
if (error != Interop.
Error
.SUCCESS)
120
case
Error
.ENOENT:
129
goto case
Error
.ENOTDIR;
131
case
Error
.ENOTDIR:
140
case
Error
.EACCES:
141
case
Error
.EBADF:
142
case
Error
.EPERM:
148
case
Error
.ENAMETOOLONG:
153
case
Error
.EWOULDBLOCK:
158
case
Error
.ECANCELED:
161
case
Error
.EFBIG:
164
case
Error
.EEXIST:
src\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetCwd.cs (1)
64
if (errorInfo.Error == Interop.
Error
.ERANGE)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetPwUid.cs (1)
87
if (errorInfo.Error == Interop.
Error
.ERANGE)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Native\Interop.IsMemberOfGroup.cs (1)
38
else if (rv == -1 && Interop.Sys.GetLastError() == Interop.
Error
.EINVAL)
src\runtime\src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeFileHandle.Unix.cs (11)
120
if (failForSymlink && error.Error == Interop.
Error
.ELOOP)
131
if (error.Error == Interop.
Error
.EISDIR)
133
error = Interop.
Error
.EACCES.Info();
386
throw Interop.GetExceptionForIoErrno(Interop.
Error
.EACCES.Info(), path);
421
if (errorInfo.Error == Interop.
Error
.EWOULDBLOCK)
448
if (error.Error == Interop.
Error
.ENOENT)
485
if (errorInfo.Error != Interop.
Error
.EBADF && errorInfo.Error != Interop.
Error
.EINVAL)
500
if (errorInfo.Error == Interop.
Error
.EFBIG ||
501
errorInfo.Error == Interop.
Error
.ENOSPC)
509
throw new IOException(SR.Format(errorInfo.Error == Interop.
Error
.EFBIG
src\runtime\src\libraries\System.Private.CoreLib\src\System\Environment.UnixOrBrowser.cs (1)
67
throw errno.Error == Interop.
Error
.EINVAL ?
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\Enumeration\FileSystemEnumerator.Unix.cs (5)
72
=> info.Error == Interop.
Error
.ENOTDIR || info.Error == Interop.
Error
.ENOENT;
75
=> info.Error == Interop.
Error
.EACCES || info.Error == Interop.
Error
.EBADF
76
|| info.Error == Interop.
Error
.EPERM;
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\FileStatus.SetTimes.OtherUnix.cs (1)
22
private static Interop.
Error
SetCreationTimeCore(SafeFileHandle? handle, string? path, long seconds, long nanoseconds) =>
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\FileStatus.Unix.cs (8)
431
Interop.
Error
error = SetCreationTimeCore(handle, path, _fileCache.BirthTime, _fileCache.BirthTimeNsec);
432
if (error != Interop.
Error
.SUCCESS && error != Interop.
Error
.ENOTSUP)
508
case Interop.
Error
.ENOENT:
511
case Interop.
Error
.ENOTDIR:
583
Interop.
Error
error = _state == InitializedNotExistsNotADir ? Interop.
Error
.ENOTDIR : Interop.
Error
.ENOENT;
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\FileSystem.Unix.cs (36)
57
if (error.Error == Interop.
Error
.EEXIST && DirectoryExists(path))
88
if (errorInfo.Error == Interop.
Error
.EXDEV || // rename fails across devices / mount points
89
errorInfo.Error == Interop.
Error
.EACCES ||
90
errorInfo.Error == Interop.
Error
.EPERM || // permissions might not allow creating hard links even if a copy would work
91
errorInfo.Error == Interop.
Error
.EOPNOTSUPP || // links aren't supported by the source file system
92
errorInfo.Error == Interop.
Error
.EMLINK || // too many hard links to the source file
93
errorInfo.Error == Interop.
Error
.ENOSYS) // the file system doesn't support link
101
if (errorInfo.Error == Interop.
Error
.ENOENT)
112
else if (errorInfo.Error == Interop.
Error
.EEXIST)
157
if (errno.Error != Interop.
Error
.ENOENT)
173
if (errno.Error == Interop.
Error
.ENOENT)
198
if (errorInfo.Error == Interop.
Error
.EXDEV) // rename fails across devices / mount points
246
case Interop.
Error
.ENOENT:
255
case Interop.
Error
.EROFS:
264
fileExistsError.Error == Interop.
Error
.ENOENT)
269
case Interop.
Error
.EISDIR:
270
errorInfo = Interop.
Error
.EACCES.Info();
303
if (errorInfo.Error == Interop.
Error
.EEXIST && DirectoryExists(fullPath))
307
else if (errorInfo.Error == Interop.
Error
.ENOENT) // Some parts of the path don't exist yet.
347
if (errorInfo.Error == Interop.
Error
.ENOENT)
355
else if (errorInfo.Error == Interop.
Error
.EEXIST)
377
if (errorInfo.Error == Interop.
Error
.EEXIST)
454
case Interop.
Error
.EACCES: // match Win32 exception
456
case Interop.
Error
.ENOENT:
458
case Interop.
Error
.ENOTDIR: // sourceFullPath exists and it's not a directory
531
if (errorInfo.Error == Interop.
Error
.ENOTEMPTY)
538
else if (errorInfo.Error == Interop.
Error
.ENOENT)
549
if (topLevel && errorInfo.Error == Interop.
Error
.ENOTDIR)
555
else if (existErr.Error == Interop.
Error
.ENOENT)
561
if (errorInfo.Error == Interop.
Error
.EACCES ||
562
errorInfo.Error == Interop.
Error
.EPERM ||
563
errorInfo.Error == Interop.
Error
.EROFS)
587
throw Interop.GetExceptionForIoErrno(new Interop.ErrorInfo(Interop.
Error
.ENOENT), fullPath);
606
throw Interop.GetExceptionForIoErrno(new Interop.ErrorInfo(Interop.
Error
.ENOENT), fullPath);
683
Interop.
Error
error = Interop.Sys.GetLastError();
686
if (error == Interop.
Error
.EINVAL)
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\PersistedFiles.Unix.cs (1)
125
if (errorInfo.Error == Interop.
Error
.ERANGE)
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\RandomAccess.Unix.cs (2)
281
=> lastError.Error is Interop.
Error
.ENXIO or Interop.
Error
.ESPIPE;
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\SharedMemoryManager.Unix.cs (8)
465
if (error.Error == Interop.
Error
.EACCES && transientRetryCount < TransientRetryCount)
474
if (error.Error != Interop.
Error
.ENOENT)
500
if (error.Error == Interop.
Error
.EEXIST && transientRetryCount < TransientRetryCount)
538
if (statResult != 0 && Interop.Sys.GetLastError() == Interop.
Error
.ENOENT)
588
if (mkdirError.Error != Interop.
Error
.EEXIST)
602
if ((error.Error == Interop.
Error
.ENOENT || error.Error == Interop.
Error
.EACCES) && RetryOnTransientPermissionFailure())
743
if (errorInfo.Error == Interop.
Error
.EWOULDBLOCK)
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\Strategies\FileStreamHelpers.Unix.cs (5)
24
if (!(ignoreNotSupported && errorInfo.Error == Interop.
Error
.ENOTSUP))
37
throw Interop.GetExceptionForIoErrno(new Interop.ErrorInfo(Interop.
Error
.EINVAL), handle.Path);
47
case Interop.
Error
.EROFS:
48
case Interop.
Error
.EINVAL:
49
case Interop.
Error
.ENOTSUP:
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\Strategies\UnixFileStreamStrategy.cs (1)
34
if (errorInfo.Error != Interop.
Error
.ESPIPE)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\NamedMutex.Unix.cs (7)
322
Interop.
Error
lockResult = (Interop.
Error
)Interop.Sys.LowLevelCrossProcessMutex_Acquire(_sharedData, timeoutMilliseconds);
326
Interop.
Error
.SUCCESS => MutexTryAcquireLockResult.AcquiredLock,
327
Interop.
Error
.EBUSY => MutexTryAcquireLockResult.TimedOut,
328
Interop.
Error
.ETIMEDOUT => MutexTryAcquireLockResult.TimedOut,
329
Interop.
Error
.EOWNERDEAD => MutexTryAcquireLockResult.AcquiredLockButMutexWasAbandoned,
330
Interop.
Error
.EAGAIN => throw new OutOfMemoryException(),