public HgPathEncoder(HgPathEncodings encodings, HgEncoder hgEncoder)
        {
            this.encodings = encodings;
            this.hgEncoder = hgEncoder;
            var t = _buildencodefun();
            encodefilename = t.Item1;
            decodefilename = t.Item2;

            foreach(var w in windowsReservedNames)
                auxdecodemap[w.Substring(0, 2) + "~" + BitConverter.ToString(new[] { (byte)w[2] }).ToLowerInvariant()  + w.Substring(3)] = w;

            auxdecodemap["~20"] = " ";
            auxdecodemap["~2e"] = ".";
        }
        public HgFnCacheStore(HgPathEncodings encodings, HgEncoder hgEncoder, string storeBasePath, HgFileSystem fileSystem) :
            base(hgEncoder, storeBasePath, fileSystem)
        {
            fnCacheFilePath = Path.Combine(StoreBasePath, "fncache");
            hgPathEncoder = new HgPathEncoder(encodings, hgEncoder);

            if(File.Exists(fnCacheFilePath))
            {
                var fnCacheEntries =
                    File.ReadAllText(fnCacheFilePath, hgEncoder.Local).
                        Split('\n').
                        Select(n => HgPathEncoder.DecodeDirectory(n.Trim()));

                fnCache = new List<string>(fnCacheEntries);
            } // if
            else
                fnCache = new List<string>();
        }