private static void Initialize() { VersionSets = new List <VersionSet>(); string currentDir = Environment.CurrentDirectory; DirectoryInfo directory = new DirectoryInfo(currentDir + @"\md5-hashes"); foreach (string f in Directory.GetFiles(directory.FullName)) { VersionSet set = new VersionSet(); foreach (string line in File.ReadLines(f)) { if (line.StartsWith("#")) { set.VersionName = line.Substring(1, line.Length - 1); } else { string[] l = line.Split('\t'); set.Files.Add(new FileHash(l[0], l[1])); } } VersionSets.Add(set); } }
private static void GetFileSet(string rootDir, ProgressBar progress) { totalFiles = FileCount(rootDir, currentCounter); CurrentFileSet = new VersionSet(); CurrentFileSet.VersionName = "My Package"; DirSearch(rootDir, progress); }