75 references to Sys
System.IO.FileSystem.Watcher (75)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\LibraryImports.g.cs (11)
111
private static unsafe partial int PathConf(string path, global::Interop.
Sys
.PathConfName name)
141
static extern unsafe int __PInvoke(byte* __path_native, global::Interop.
Sys
.PathConfName __name_native);
289
internal static unsafe partial int FStat(global::System.Runtime.InteropServices.SafeHandle fd, out global::Interop.
Sys
.FileStatus output)
304
fixed (global::Interop.
Sys
.FileStatus* __output_native = &output)
322
static extern unsafe int __PInvoke(nint __fd_native, global::Interop.
Sys
.FileStatus* __output_native);
332
internal static unsafe partial int Stat(string path, out global::Interop.
Sys
.FileStatus output)
347
fixed (global::Interop.
Sys
.FileStatus* __output_native = &output)
365
static extern unsafe int __PInvoke(byte* __path_native, global::Interop.
Sys
.FileStatus* __output_native);
375
internal static unsafe partial int LStat(string path, out global::Interop.
Sys
.FileStatus output)
390
fixed (global::Interop.
Sys
.FileStatus* __output_native = &output)
408
static 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);
141
get { return _rawErrno == -1 ? (_rawErrno = Interop.
Sys
.ConvertErrorPalToPlatform(_error)) : _rawErrno; }
146
return Interop.
Sys
.StrError(RawErrno);
src\runtime\src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (3)
42
ThrowExceptionForIoErrno(
Sys
.GetLastErrorInfo(), path, isDirError);
53
ThrowExceptionForIoErrno(
Sys
.GetLastErrorInfo(), path: null, isDirError: false);
99
Exception e = Interop.GetExceptionForIoErrno(
Sys
.GetLastErrorInfo(), path, isDirError);
System\IO\FileSystemWatcher.Linux.cs (58)
148
SafeFileHandle handle = Interop.
Sys
.INotifyInit();
152
Interop.ErrorInfo error = Interop.
Sys
.GetLastErrorInfo();
220
private WatchedDirectory? AddOrUpdateWatchedDirectory(Watcher watcher, WatchedDirectory? parent, string directoryPath, Interop.
Sys
.NotifyEvents watchFilters, bool ignoreMissing = true)
244
Interop.
Sys
.NotifyEvents mask = watchFilters |
245
Interop.
Sys
.NotifyEvents.IN_ONLYDIR | // we only allow watches on directories
246
Interop.
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.
253
mask |= Interop.
Sys
.NotifyEvents.IN_MASK_ADD;
258
mask |= Interop.
Sys
.NotifyEvents.IN_MOVED_TO | Interop.
Sys
.NotifyEvents.IN_MOVED_FROM;
261
int wd = Interop.
Sys
.INotifyAddWatch(_inotifyHandle, directoryPath, (uint)mask);
266
Interop.ErrorInfo error = Interop.
Sys
.GetLastErrorInfo();
409
Interop.
Sys
.INotifyRemoveWatch(_inotifyHandle, watch.WatchDescriptor);
522
const Interop.
Sys
.NotifyEvents FileDirEvents =
523
Interop.
Sys
.NotifyEvents.IN_CREATE |
524
Interop.
Sys
.NotifyEvents.IN_DELETE |
525
Interop.
Sys
.NotifyEvents.IN_MOVED_FROM |
526
Interop.
Sys
.NotifyEvents.IN_MOVED_TO;
528
const Interop.
Sys
.NotifyEvents EventMask =
530
Interop.
Sys
.NotifyEvents.IN_ACCESS |
531
Interop.
Sys
.NotifyEvents.IN_MODIFY |
532
Interop.
Sys
.NotifyEvents.IN_ATTRIB;
535
Interop.
Sys
.NotifyEvents mask = (Interop.
Sys
.NotifyEvents)nextEvent.mask;
538
if ((mask & Interop.
Sys
.NotifyEvents.IN_Q_OVERFLOW) != 0)
570
bool isMatchingMovedTo = (mask & Interop.
Sys
.NotifyEvents.IN_MOVED_TO) != 0 && movedFromCookie == nextEvent.cookie;
586
if (!IsIgnoredEvent(watcher, Interop.
Sys
.NotifyEvents.IN_DELETE, movedFromIsDir))
602
bool isDir = (mask & (Interop.
Sys
.NotifyEvents.IN_ISDIR | Interop.
Sys
.NotifyEvents.IN_IGNORED)) != 0;
607
if ((mask & Interop.
Sys
.NotifyEvents.IN_MOVED_FROM) != 0)
622
Interop.
Sys
.Poll(_inotifyHandle, Interop.PollEvents.POLLIN, MillisecondsTimeout, out events);
645
if ((mask & (Interop.
Sys
.NotifyEvents.IN_CREATE | Interop.
Sys
.NotifyEvents.IN_MOVED_TO)) != 0)
657
else if ((mask & Interop.
Sys
.NotifyEvents.IN_MOVED_FROM) != 0)
664
if (((mask & Interop.
Sys
.NotifyEvents.IN_IGNORED) != 0)
665
|| (((mask & Interop.
Sys
.NotifyEvents.IN_MOVE_SELF) != 0) && dir.IsRootDir))
667
int ignoredFd = (mask & Interop.
Sys
.NotifyEvents.IN_IGNORED) != 0 ? nextEvent.wd : -1;
690
case Interop.
Sys
.NotifyEvents.IN_CREATE:
693
case Interop.
Sys
.NotifyEvents.IN_DELETE:
696
case Interop.
Sys
.NotifyEvents.IN_ACCESS:
697
case Interop.
Sys
.NotifyEvents.IN_MODIFY:
698
case Interop.
Sys
.NotifyEvents.IN_ATTRIB:
701
case Interop.
Sys
.NotifyEvents.IN_MOVED_FROM:
704
case Interop.
Sys
.NotifyEvents.IN_MOVED_TO:
717
=> matchingFromFound ??= (mask & Interop.
Sys
.NotifyEvents.IN_MOVED_TO) != 0 ? FindMatchingWatchedDirectory(dirs, watcher) : null;
777
static bool IsIgnoredEvent(Watcher watcher, Interop.
Sys
.NotifyEvents mask, bool isDir)
866
_bufferAvailable = Interop.CheckIo(Interop.
Sys
.Read(_inotifyHandle, buf, this._buffer.Length));
1011
public Interop.
Sys
.NotifyEvents WatchFilters { get; }
1256
private static Interop.
Sys
.NotifyEvents TranslateFilters(NotifyFilters filters)
1258
Interop.
Sys
.NotifyEvents result = 0;
1264
Interop.
Sys
.NotifyEvents.IN_CREATE |
1265
Interop.
Sys
.NotifyEvents.IN_DELETE;
1285
result |= Interop.
Sys
.NotifyEvents.IN_ACCESS;
1289
result |= Interop.
Sys
.NotifyEvents.IN_MODIFY;
1293
result |= Interop.
Sys
.NotifyEvents.IN_ATTRIB;
1304
Interop.
Sys
.NotifyEvents.IN_MOVED_FROM |
1305
Interop.
Sys
.NotifyEvents.IN_MOVED_TO;