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