3 instantiations of WatchedDirectory
System.IO.FileSystem.Watcher (3)
System\IO\FileSystemWatcher.Linux.cs (3)
298dir = new WatchedDirectory(watch, watcher, "", parent); 325dir = new WatchedDirectory(watch, watcher, name, parent); 831newDir = new WatchedDirectory(watch, watcher, name, parent);
63 references to WatchedDirectory
System.IO.FileSystem.Watcher (63)
System\IO\FileSystemWatcher.Linux.cs (63)
140private WatchedDirectory[] _dirBuffer = new WatchedDirectory[4]; 220private WatchedDirectory? AddOrUpdateWatchedDirectory(Watcher watcher, WatchedDirectory? parent, string directoryPath, Interop.Sys.NotifyEvents watchFilters, bool ignoreMissing = true) 224WatchedDirectory? inotifyWatchesToRemove = null; 225WatchedDirectory dir; 348private void RemoveWatchedDirectory(WatchedDirectory dir, int ignoredFd = -1) 360private void RemoveUnusedINotifyWatches(WatchedDirectory removedDir, int ignoredFd = -1) 387foreach (WatchedDirectory child in children) 417private void RemoveWatchedDirectoryFromParentAndWatches(WatchedDirectory dir, ref bool removeINotifyWatches) 457foreach (var child in children) 464static void RemoveFromWatch(WatchedDirectory dir, ref bool removeINotifyWatches) 555ReadOnlySpan<WatchedDirectory> movedFromDirs = _dirBuffer.AsSpan(0, movedFromWatchCount); 564ReadOnlySpan<WatchedDirectory> dirs = watch is not null ? GetWatchedDirectories(watch, ref _dirBuffer, offset: movedFromDirs.Length) : default; 572foreach (var movedFrom in movedFromDirs) 638foreach (WatchedDirectory dir in dirs) 641WatchedDirectory? matchingFromFound = null; // cache FindMatchingFrom result. 649if (FindMatchingFrom(movedFromDirs) is WatchedDirectory matchingFrom) 705if (FindMatchingFrom(movedFromDirs) is WatchedDirectory matchingFrom) 716WatchedDirectory? FindMatchingFrom(ReadOnlySpan<WatchedDirectory> dirs) 731void RemoveWatchedDirectoryChild(WatchedDirectory dir, string movedFromName) 734WatchedDirectory? child = null; 749static ReadOnlySpan<WatchedDirectory> GetWatchedDirectories(Watch watch, ref WatchedDirectory[] buffer, int offset) 764static WatchedDirectory? FindMatchingWatchedDirectory(ReadOnlySpan<WatchedDirectory> dir, Watcher watcher) 766foreach (var d in dir) 786private void RenameWatchedDirectories(WatchedDirectory moveTo, string moveToName, WatchedDirectory moveFrom, string moveFromName) 788WatchedDirectory? sourceToRemove = null; 800WatchedDirectory source = moveFrom.Children![sourceIdx]; 812WatchedDirectory renamed = CreateWatchedDirectoryFrom(moveTo, source, moveToName); 822static WatchedDirectory CreateWatchedDirectoryFrom(WatchedDirectory parent, WatchedDirectory src, string name) 827WatchedDirectory newDir; 838foreach (var child in children) 949public WatchedDirectory? Directory { get; } 951public WatchedDirectory? OldDirectory { get; } 955private WatcherEvent(WatcherChangeTypes type, WatchedDirectory watch, string name, WatchedDirectory? oldWatch = null, string? oldName = null) 970public static WatcherEvent Deleted(WatchedDirectory dir, string name) 973public static WatcherEvent Created(WatchedDirectory dir, string name) 976public static WatcherEvent Changed(WatchedDirectory dir, string name) 979public static WatcherEvent Renamed(WatchedDirectory dir, string name, WatchedDirectory oldDir, string oldName) 1015public WatchedDirectory? RootDirectory 1048WatchedDirectory? rootDirectory; 1078WatchedDirectory? CreateRootWatch() 1084WatchedDirectory? root; 1178internal bool WatchChildDirectories(WatchedDirectory parent, string path, bool includeBasePath = true) 1188WatchedDirectory? newParent = AddOrUpdateWatch(parent, path); 1218WatchedDirectory? AddOrUpdateWatch(WatchedDirectory parent, string path) 1314private List<WatchedDirectory>? _children; 1319public WatchedDirectory? Parent { get; } 1322public WatchedDirectory(Watch watch, Watcher watcher, string name, WatchedDirectory? parent) 1330public List<WatchedDirectory>? Children 1343public List<WatchedDirectory> InitializedChildren => Children ??= new List<WatchedDirectory>(); 1404private List<WatchedDirectory> _watchers = new(); 1407public List<WatchedDirectory> Watchers