DigestFiles() public method

public DigestFiles ( IEnumerable files ) : DataHash>.Dictionary
files IEnumerable
return DataHash>.Dictionary
Esempio n. 1
0
        public void ThreadyHashIncludeFilesCacheTest()
        {
            using (var ic = FileCacheStore.Load("testincs"))
            {
                var ht = new HashUtil(ic);

                var hashes = ht.DigestFiles(Directory.GetFiles(IncludeDir));
                Assert.IsTrue(hashes.Count > 0);
                System.Threading.Thread.Sleep(500);
                var hashes2 = ht.DigestFiles(Directory.GetFiles(IncludeDir));
                foreach (var h in hashes2)
                {
                    if (hashes.ContainsKey(h.Key))
                    {
                        Assert.IsTrue(h.Value.Cached);
                    }
                }
            }
        }
Esempio n. 2
0
 public virtual Dictionary <string, DataHash> GetHashes(IEnumerable <string> fnames)
 {
     return(hasher.DigestFiles(fnames));
 }