private static void CompareHashes(bool debug = false) { Sames = CompareUtils.CompareImages(Cache); if (debug) { var strm = new StreamWriter(new FileInfo("same.txt").OpenWrite()); foreach (var p in Sames) { strm.WriteLine(p.First + ":=" + p.Last); } strm.Close(); } }
private static int LoadCachedFiles(string cachefile = "cache.hash") { Cache = new HashCache(new FileInfo(cachefile)); int iters = CompareUtils.LoadImageHashes(RelDir, Cache); foreach (string file in Cache.Filenames) { var fulf = Path.GetFullPath(Path.Combine(RelDir, file)); if (!new FileInfo(fulf).Exists) { Cache.RemoveFile(file); } } Cache.WriteCache(); return(iters); }