98 references to Interop
System.IO.FileSystem.Watcher (98)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\LibraryImports.g.cs (15)
87internal static extern partial global::Interop.Error ConvertErrorPlatformToPal(int platformErrno); 95internal static extern partial int ConvertErrorPalToPlatform(global::Interop.Error error); 111private static unsafe partial int PathConf(string path, global::Interop.Sys.PathConfName name) 141static extern unsafe int __PInvoke(byte* __path_native, global::Interop.Sys.PathConfName __name_native); 281internal static unsafe extern partial global::Interop.Error Poll(global::Interop.PollEvent* pollEvents, uint eventCount, int timeout, uint* triggered); 289internal static unsafe partial int FStat(global::System.Runtime.InteropServices.SafeHandle fd, out global::Interop.Sys.FileStatus output) 304fixed (global::Interop.Sys.FileStatus* __output_native = &output) 322static extern unsafe int __PInvoke(nint __fd_native, global::Interop.Sys.FileStatus* __output_native); 332internal static unsafe partial int Stat(string path, out global::Interop.Sys.FileStatus output) 347fixed (global::Interop.Sys.FileStatus* __output_native = &output) 365static extern unsafe int __PInvoke(byte* __path_native, global::Interop.Sys.FileStatus* __output_native); 375internal static unsafe partial int LStat(string path, out global::Interop.Sys.FileStatus output) 390fixed (global::Interop.Sys.FileStatus* __output_native = &output) 408static extern unsafe int __PInvoke(byte* __path_native, global::Interop.Sys.FileStatus* __output_native);
src\runtime\src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (6)
124_error = Interop.Sys.ConvertErrorPlatformToPal(errno); 141get { return _rawErrno == -1 ? (_rawErrno = Interop.Sys.ConvertErrorPalToPlatform(_error)) : _rawErrno; } 146return Interop.Sys.StrError(RawErrno); 220public static Interop.ErrorInfo Info(this Interop.Error error) 222return new Interop.ErrorInfo(error);
src\runtime\src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (4)
16throw Interop.GetExceptionForIoErrno(errorInfo, path, isDirError); 21if (error != Interop.Error.SUCCESS) 99Exception e = Interop.GetExceptionForIoErrno(Sys.GetLastErrorInfo(), path, isDirError); 192internal static Exception GetIOException(Interop.ErrorInfo errorInfo, string? path = null)
System\IO\FileSystemWatcher.Linux.cs (73)
148SafeFileHandle handle = Interop.Sys.INotifyInit(); 152Interop.ErrorInfo error = Interop.Sys.GetLastErrorInfo(); 156case Interop.Error.EMFILE: 162case Interop.Error.ENFILE: 164case Interop.Error.ENOTSUP: 167throw Interop.GetExceptionForIoErrno(error); 220private WatchedDirectory? AddOrUpdateWatchedDirectory(Watcher watcher, WatchedDirectory? parent, string directoryPath, Interop.Sys.NotifyEvents watchFilters, bool ignoreMissing = true) 244Interop.Sys.NotifyEvents mask = watchFilters | 245Interop.Sys.NotifyEvents.IN_ONLYDIR | // we only allow watches on directories 246Interop.Sys.NotifyEvents.IN_EXCL_UNLINK | // we want to stop monitoring unlinked files 247(parent == null ? Interop.Sys.NotifyEvents.IN_MOVE_SELF // Detect when the root directory is moved. 248: Interop.Sys.NotifyEvents.IN_DONT_FOLLOW); // Follow links only for the root path, not the subdirs. 253mask |= Interop.Sys.NotifyEvents.IN_MASK_ADD; 258mask |= Interop.Sys.NotifyEvents.IN_MOVED_TO | Interop.Sys.NotifyEvents.IN_MOVED_FROM; 261int wd = Interop.Sys.INotifyAddWatch(_inotifyHandle, directoryPath, (uint)mask); 266Interop.ErrorInfo error = Interop.Sys.GetLastErrorInfo(); 269if (ignoreMissing && (error.Error == Interop.Error.ENOENT || error.Error == Interop.Error.ENOTDIR)) 275if (error.Error == Interop.Error.ENOSPC) 285exc = Interop.GetExceptionForIoErrno(error, directoryPath); 409Interop.Sys.INotifyRemoveWatch(_inotifyHandle, watch.WatchDescriptor); 522const Interop.Sys.NotifyEvents FileDirEvents = 523Interop.Sys.NotifyEvents.IN_CREATE | 524Interop.Sys.NotifyEvents.IN_DELETE | 525Interop.Sys.NotifyEvents.IN_MOVED_FROM | 526Interop.Sys.NotifyEvents.IN_MOVED_TO; 528const Interop.Sys.NotifyEvents EventMask = 530Interop.Sys.NotifyEvents.IN_ACCESS | 531Interop.Sys.NotifyEvents.IN_MODIFY | 532Interop.Sys.NotifyEvents.IN_ATTRIB; 535Interop.Sys.NotifyEvents mask = (Interop.Sys.NotifyEvents)nextEvent.mask; 538if ((mask & Interop.Sys.NotifyEvents.IN_Q_OVERFLOW) != 0) 570bool isMatchingMovedTo = (mask & Interop.Sys.NotifyEvents.IN_MOVED_TO) != 0 && movedFromCookie == nextEvent.cookie; 586if (!IsIgnoredEvent(watcher, Interop.Sys.NotifyEvents.IN_DELETE, movedFromIsDir)) 602bool isDir = (mask & (Interop.Sys.NotifyEvents.IN_ISDIR | Interop.Sys.NotifyEvents.IN_IGNORED)) != 0; 607if ((mask & Interop.Sys.NotifyEvents.IN_MOVED_FROM) != 0) 621Interop.PollEvents events; 622Interop.Sys.Poll(_inotifyHandle, Interop.PollEvents.POLLIN, MillisecondsTimeout, out events); 624eventAvailable = events != Interop.PollEvents.POLLNONE; 645if ((mask & (Interop.Sys.NotifyEvents.IN_CREATE | Interop.Sys.NotifyEvents.IN_MOVED_TO)) != 0) 657else if ((mask & Interop.Sys.NotifyEvents.IN_MOVED_FROM) != 0) 664if (((mask & Interop.Sys.NotifyEvents.IN_IGNORED) != 0) 665|| (((mask & Interop.Sys.NotifyEvents.IN_MOVE_SELF) != 0) && dir.IsRootDir)) 667int ignoredFd = (mask & Interop.Sys.NotifyEvents.IN_IGNORED) != 0 ? nextEvent.wd : -1; 690case Interop.Sys.NotifyEvents.IN_CREATE: 693case Interop.Sys.NotifyEvents.IN_DELETE: 696case Interop.Sys.NotifyEvents.IN_ACCESS: 697case Interop.Sys.NotifyEvents.IN_MODIFY: 698case Interop.Sys.NotifyEvents.IN_ATTRIB: 701case Interop.Sys.NotifyEvents.IN_MOVED_FROM: 704case Interop.Sys.NotifyEvents.IN_MOVED_TO: 717=> matchingFromFound ??= (mask & Interop.Sys.NotifyEvents.IN_MOVED_TO) != 0 ? FindMatchingWatchedDirectory(dirs, watcher) : null; 777static bool IsIgnoredEvent(Watcher watcher, Interop.Sys.NotifyEvents mask, bool isDir) 866_bufferAvailable = Interop.CheckIo(Interop.Sys.Read(_inotifyHandle, buf, this._buffer.Length)); 1011public Interop.Sys.NotifyEvents WatchFilters { get; } 1209catch (IOException ex) when (ex.HResult == Interop.Error.ENOTDIR.Info().RawErrno) 1256private static Interop.Sys.NotifyEvents TranslateFilters(NotifyFilters filters) 1258Interop.Sys.NotifyEvents result = 0; 1264Interop.Sys.NotifyEvents.IN_CREATE | 1265Interop.Sys.NotifyEvents.IN_DELETE; 1285result |= Interop.Sys.NotifyEvents.IN_ACCESS; 1289result |= Interop.Sys.NotifyEvents.IN_MODIFY; 1293result |= Interop.Sys.NotifyEvents.IN_ATTRIB; 1304Interop.Sys.NotifyEvents.IN_MOVED_FROM | 1305Interop.Sys.NotifyEvents.IN_MOVED_TO;