public IDirectoryInfo GetParent(string path) { Guard.NotNull(path, nameof(path)); AssertPathIsNotWhiteSpace(path); AbsolutePath absolutePath = owner.ToAbsolutePath(path); AbsolutePath parentPath = absolutePath.TryGetParentPath(); return(parentPath == null ? null : owner.ConstructDirectoryInfo(parentPath)); }
private bool MatchesIncludeSubdirectories([NotNull] AbsolutePath path, [NotNull] AbsolutePath watchDirectory) { return(includeSubdirectories ? path.IsDescendantOf(watchDirectory) : AbsolutePath.AreEquivalent(watchDirectory, path.TryGetParentPath())); }