private bool MatchesIncludeSubdirectories([NotNull] AbsolutePath path, [NotNull] AbsolutePath watchDirectory) { return(includeSubdirectories ? path.IsDescendantOf(watchDirectory) : AbsolutePath.AreEquivalent(watchDirectory, path.TryGetParentPath())); }
private bool IsDeleteOfWatcherDirectory([NotNull] FakeSystemChangeEventArgs args, [NotNull] AbsolutePath pathInArgs) { return(args.ChangeType == WatcherChangeTypes.Deleted && args.Filters.HasFlag(NotifyFilters.DirectoryName) && AbsolutePath.AreEquivalent(pathInArgs, directoryToWatch)); }