75 references to Sys
System.IO.FileSystem.Watcher (75)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\LibraryImports.g.cs (11)
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); 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 (3)
124_error = Interop.Sys.ConvertErrorPlatformToPal(errno); 141get { return _rawErrno == -1 ? (_rawErrno = Interop.Sys.ConvertErrorPalToPlatform(_error)) : _rawErrno; } 146return Interop.Sys.StrError(RawErrno);
src\runtime\src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (3)
42ThrowExceptionForIoErrno(Sys.GetLastErrorInfo(), path, isDirError); 53ThrowExceptionForIoErrno(Sys.GetLastErrorInfo(), path: null, isDirError: false); 99Exception e = Interop.GetExceptionForIoErrno(Sys.GetLastErrorInfo(), path, isDirError);
System\IO\FileSystemWatcher.Linux.cs (58)
148SafeFileHandle handle = Interop.Sys.INotifyInit(); 152Interop.ErrorInfo error = Interop.Sys.GetLastErrorInfo(); 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(); 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) 622Interop.Sys.Poll(_inotifyHandle, Interop.PollEvents.POLLIN, MillisecondsTimeout, out events); 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; } 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;