public FileAndDirectoryRules FindDefault()
 {
   FileAndDirectoryRules rules = new FileAndDirectoryRules();
   rules.DirectoryRules.AddExclusion(DefaultInclusionRules.GitDirectory);
   rules.DirectoryRules.AddExclusion(DefaultInclusionRules.SubversionDirectory);
   rules.DirectoryRules.AddExclusion(DefaultInclusionRules.PtDirectory);
   rules.DirectoryRules.AddExclusion(DefaultInclusionRules.ObjDirectory);
   rules.FileRules.AddInclusion(DefaultInclusionRules.DllFile);
   rules.FileRules.AddInclusion(DefaultInclusionRules.ExeFile);
   rules.FileRules.AddInclusion(DefaultInclusionRules.PdbFile);
   rules.FileRules.AddInclusion(DefaultInclusionRules.ConfigFile);
   return rules;
 }
 private FileSystemDirectory CreateDirectory(Purl path, FileAndDirectoryRules rules)
 {
   FileSystemDirectory entry = new FileSystemDirectory(path);
   foreach (string subPath in _fileSystem.GetEntries(path.AsString))
   {
     Purl entryPath = new Purl(subPath);
     FileSystemEntry subEntry = FindEntry(entryPath, rules);
     if (subEntry != null)
     {
       entry.Entries.Add(subEntry);
     }
   }
   return entry;
 }
 public FileSystemEntry FindEntry(Purl path, FileAndDirectoryRules rules)
 {
   if (_fileSystem.IsFile(path.AsString))
   {
     if (rules.IncludesFile(path) != IncludeExclude.Exclude)
     {
       return CreateFile(path);
     }
   }
   else if (_fileSystem.IsDirectory(path.AsString))
   {
     if (rules.IncludesDirectory(path) != IncludeExclude.Exclude)
     {
       return CreateDirectory(path, rules);
     }
   }
   return null;
 }