3 instantiations of WatchedDirectory
System.IO.FileSystem.Watcher (3)
System\IO\FileSystemWatcher.Linux.cs (3)
295dir = new WatchedDirectory(watch, watcher, "", parent); 322dir = new WatchedDirectory(watch, watcher, name, parent); 820newDir = 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]; 218private WatchedDirectory? AddOrUpdateWatchedDirectory(Watcher watcher, WatchedDirectory? parent, string directoryPath, Interop.Sys.NotifyEvents watchFilters, bool ignoreMissing = true) 222WatchedDirectory? inotifyWatchesToRemove = null; 223WatchedDirectory dir; 345private void RemoveWatchedDirectory(WatchedDirectory dir, int ignoredFd = -1) 357private void RemoveUnusedINotifyWatches(WatchedDirectory removedDir, int ignoredFd = -1) 384foreach (WatchedDirectory child in children) 414private void RemoveWatchedDirectoryFromParentAndWatches(WatchedDirectory dir, ref bool removeINotifyWatches) 454foreach (var child in children) 461static void RemoveFromWatch(WatchedDirectory dir, ref bool removeINotifyWatches) 552ReadOnlySpan<WatchedDirectory> movedFromDirs = _dirBuffer.AsSpan(0, movedFromWatchCount); 561ReadOnlySpan<WatchedDirectory> dirs = watch is not null ? GetWatchedDirectories(watch, ref _dirBuffer, offset: movedFromDirs.Length) : default; 569foreach (var movedFrom in movedFromDirs) 635foreach (WatchedDirectory dir in dirs) 638WatchedDirectory? matchingFromFound = null; // cache FindMatchingFrom result. 646if (FindMatchingFrom(movedFromDirs) is WatchedDirectory matchingFrom) 694if (FindMatchingFrom(movedFromDirs) is WatchedDirectory matchingFrom) 705WatchedDirectory? FindMatchingFrom(ReadOnlySpan<WatchedDirectory> dirs) 720void RemoveWatchedDirectoryChild(WatchedDirectory dir, string movedFromName) 723WatchedDirectory? child = null; 738static ReadOnlySpan<WatchedDirectory> GetWatchedDirectories(Watch watch, ref WatchedDirectory[] buffer, int offset) 753static WatchedDirectory? FindMatchingWatchedDirectory(ReadOnlySpan<WatchedDirectory> dir, Watcher watcher) 755foreach (var d in dir) 775private void RenameWatchedDirectories(WatchedDirectory moveTo, string moveToName, WatchedDirectory moveFrom, string moveFromName) 777WatchedDirectory? sourceToRemove = null; 789WatchedDirectory source = moveFrom.Children![sourceIdx]; 801WatchedDirectory renamed = CreateWatchedDirectoryFrom(moveTo, source, moveToName); 811static WatchedDirectory CreateWatchedDirectoryFrom(WatchedDirectory parent, WatchedDirectory src, string name) 816WatchedDirectory newDir; 827foreach (var child in children) 938public WatchedDirectory? Directory { get; } 940public WatchedDirectory? OldDirectory { get; } 944private WatcherEvent(WatcherChangeTypes type, WatchedDirectory watch, string name, WatchedDirectory? oldWatch = null, string? oldName = null) 959public static WatcherEvent Deleted(WatchedDirectory dir, string name) 962public static WatcherEvent Created(WatchedDirectory dir, string name) 965public static WatcherEvent Changed(WatchedDirectory dir, string name) 968public static WatcherEvent Renamed(WatchedDirectory dir, string name, WatchedDirectory oldDir, string oldName) 1004public WatchedDirectory? RootDirectory 1037WatchedDirectory? rootDirectory; 1067WatchedDirectory? CreateRootWatch() 1073WatchedDirectory? root; 1167internal bool WatchChildDirectories(WatchedDirectory parent, string path, bool includeBasePath = true) 1177WatchedDirectory? newParent = AddOrUpdateWatch(parent, path); 1207WatchedDirectory? AddOrUpdateWatch(WatchedDirectory parent, string path) 1306private List<WatchedDirectory>? _children; 1311public WatchedDirectory? Parent { get; } 1314public WatchedDirectory(Watch watch, Watcher watcher, string name, WatchedDirectory? parent) 1322public List<WatchedDirectory>? Children 1335public List<WatchedDirectory> InitializedChildren => Children ??= new List<WatchedDirectory>(); 1396private List<WatchedDirectory> _watchers = new(); 1399public List<WatchedDirectory> Watchers