public long ReadStat(string statfile) { try { var x = System.IO.File.ReadAllText(cache.MakePath(K_Stats, statfile)); return(Int64.Parse(x)); } catch { return(0); } }
protected CacheManifest GetCachedManifestLocked(DataHash commonkey) { CacheManifest manifest = null; if (outputCache.ContainsEntry(commonkey.Hash, F_Manifest)) { var mn = outputCache.MakePath(commonkey.Hash, F_Manifest); using (var fs = new FileStream(mn, FileMode.Open)){ manifest = CacheManifest.Deserialize(fs); } } return(manifest); }