Antlr4.StringTemplate.TemplateGroup.TryLoadGroupFromCache C# (CSharp) Method

TryLoadGroupFromCache() private method

private TryLoadGroupFromCache ( string cachePath, string prefix, string fileName ) : bool
cachePath string
prefix string
fileName string
return bool
        private bool TryLoadGroupFromCache(string cachePath, string prefix, string fileName)
        {
            string cacheFileName = Path.GetFileNameWithoutExtension(fileName) + (uint)fileName.GetHashCode() + prefix.Replace(Path.DirectorySeparatorChar, '_').Replace(Path.AltDirectorySeparatorChar, '_');
            cacheFileName = Path.Combine(cachePath, cacheFileName);
            if (!File.Exists(cacheFileName))
                return false;

            try
            {
                byte[] data = File.ReadAllBytes(cacheFileName);
                return TryLoadCachedGroup(data, File.GetLastWriteTimeUtc(new Uri(fileName).LocalPath));
            }
            catch (IOException)
            {
                return false;
            }
        }