private static FileSystemNode CreateFileSystemDirNode(DirectoryInfo directoryInfo) { FileSystemNode result = new FileSystemNode(directoryInfo.Name, isDir: true); // //if (directoryInfo. //(File.Exists("")) DocIgnore docIgnore = new DocIgnore(directoryInfo); // foreach (DirectoryInfo subDirectoryInfo in directoryInfo.EnumerateDirectories()) { if (docIgnore.Ignore(subDirectoryInfo)) continue; result.AddSub(CreateFileSystemDirNode(subDirectoryInfo), docIgnore.UserIgnore(subDirectoryInfo)); } // foreach (FileInfo fileInfo in directoryInfo.EnumerateFiles()) { if (docIgnore.Ignore(fileInfo)) continue; result.AddFile(fileInfo.Name, docIgnore.UserIgnore(fileInfo)); } // return result; }