public static int CountDirectoryEntries(DirectorySnapshot entry) { var result = 1; foreach (var x in entry.ChildDirectories.ToForeachEnum()) { result += CountDirectoryEntries(x); } return(result); }
private int CountFileEntries(DirectorySnapshot entry) { return (entry.Files.Count + entry.DirectoryEntries.Aggregate(0, (acc, x) => acc + CountFileEntries(x))); }
private int CountDirectoryEntries(DirectorySnapshot entry) { return (1 + entry.ChildDirectories.Aggregate(0, (acc, x) => acc + CountDirectoryEntries(x))); }
public ProjectRootSnapshot(IProject project, DirectorySnapshot directory) { _project = project; _directory = directory; }