protected void CreateRecursive(string[] files, bool recursive, TextWriter writer) { foreach (string f in files){ if (Directory.Exists (f)){ if (recursive) CreateRecursive (Directory.GetFileSystemEntries (f), recursive, writer); } else { SFVElement e = new SFVElement (f, "", new FileHasherSHA1()); e.GenerateHash(); PutSHA1 (e, writer); } } }
protected void CreateRecursive(string[] files, bool recursive, TextWriter writer) { foreach (string f in files){ if (Directory.Exists (f)){ if (recursive){ CreateRecursive (Directory.GetFileSystemEntries (f), recursive, writer); } } else { SFVElement e = new SFVElement (f, "", new FileHasherCrc32()); e.GenerateHash(); writer.WriteLine (f.Replace (Path.DirectorySeparatorChar, '\\') + " " + e.RealHash); } } }