3 instantiations of WatchedDirectory
System.IO.FileSystem.Watcher (3)
System\IO\FileSystemWatcher.Linux.cs (3)
296dir = new WatchedDirectory(watch, watcher, "", parent); 323dir = new WatchedDirectory(watch, watcher, name, parent); 829newDir = 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; 346private void RemoveWatchedDirectory(WatchedDirectory dir, int ignoredFd = -1) 358private void RemoveUnusedINotifyWatches(WatchedDirectory removedDir, int ignoredFd = -1) 385foreach (WatchedDirectory child in children) 415private void RemoveWatchedDirectoryFromParentAndWatches(WatchedDirectory dir, ref bool removeINotifyWatches) 455foreach (var child in children) 462static void RemoveFromWatch(WatchedDirectory dir, ref bool removeINotifyWatches) 553ReadOnlySpan<WatchedDirectory> movedFromDirs = _dirBuffer.AsSpan(0, movedFromWatchCount); 562ReadOnlySpan<WatchedDirectory> dirs = watch is not null ? GetWatchedDirectories(watch, ref _dirBuffer, offset: movedFromDirs.Length) : default; 570foreach (var movedFrom in movedFromDirs) 636foreach (WatchedDirectory dir in dirs) 639WatchedDirectory? matchingFromFound = null; // cache FindMatchingFrom result. 647if (FindMatchingFrom(movedFromDirs) is WatchedDirectory matchingFrom) 703if (FindMatchingFrom(movedFromDirs) is WatchedDirectory matchingFrom) 714WatchedDirectory? FindMatchingFrom(ReadOnlySpan<WatchedDirectory> dirs) 729void RemoveWatchedDirectoryChild(WatchedDirectory dir, string movedFromName) 732WatchedDirectory? child = null; 747static ReadOnlySpan<WatchedDirectory> GetWatchedDirectories(Watch watch, ref WatchedDirectory[] buffer, int offset) 762static WatchedDirectory? FindMatchingWatchedDirectory(ReadOnlySpan<WatchedDirectory> dir, Watcher watcher) 764foreach (var d in dir) 784private void RenameWatchedDirectories(WatchedDirectory moveTo, string moveToName, WatchedDirectory moveFrom, string moveFromName) 786WatchedDirectory? sourceToRemove = null; 798WatchedDirectory source = moveFrom.Children![sourceIdx]; 810WatchedDirectory renamed = CreateWatchedDirectoryFrom(moveTo, source, moveToName); 820static WatchedDirectory CreateWatchedDirectoryFrom(WatchedDirectory parent, WatchedDirectory src, string name) 825WatchedDirectory newDir; 836foreach (var child in children) 947public WatchedDirectory? Directory { get; } 949public WatchedDirectory? OldDirectory { get; } 953private WatcherEvent(WatcherChangeTypes type, WatchedDirectory watch, string name, WatchedDirectory? oldWatch = null, string? oldName = null) 968public static WatcherEvent Deleted(WatchedDirectory dir, string name) 971public static WatcherEvent Created(WatchedDirectory dir, string name) 974public static WatcherEvent Changed(WatchedDirectory dir, string name) 977public static WatcherEvent Renamed(WatchedDirectory dir, string name, WatchedDirectory oldDir, string oldName) 1013public WatchedDirectory? RootDirectory 1046WatchedDirectory? rootDirectory; 1076WatchedDirectory? CreateRootWatch() 1082WatchedDirectory? root; 1176internal bool WatchChildDirectories(WatchedDirectory parent, string path, bool includeBasePath = true) 1186WatchedDirectory? newParent = AddOrUpdateWatch(parent, path); 1216WatchedDirectory? AddOrUpdateWatch(WatchedDirectory parent, string path) 1312private List<WatchedDirectory>? _children; 1317public WatchedDirectory? Parent { get; } 1320public WatchedDirectory(Watch watch, Watcher watcher, string name, WatchedDirectory? parent) 1328public List<WatchedDirectory>? Children 1341public List<WatchedDirectory> InitializedChildren => Children ??= new List<WatchedDirectory>(); 1402private List<WatchedDirectory> _watchers = new(); 1405public List<WatchedDirectory> Watchers