Beispiel #1
0
        public override IReadOnlyDictionary <string, GameFile> Mount(bool caseInsensitive = false)
        {
            var watch = new Stopwatch();

            watch.Start();
            if (Info.Version >= EPakFileVersion.PakFile_Version_PathHashIndex)
            {
                ReadIndexUpdated(caseInsensitive);
            }
            else
            {
                ReadIndexLegacy(caseInsensitive);
            }
            var elapsed = watch.Elapsed;
            var sb      = new StringBuilder($"Pak \"{Name}\": {FileCount} files");

            if (EncryptedFileCount != 0)
            {
                sb.Append($" ({EncryptedFileCount} encrypted)");
            }
            if (MountPoint.Contains("/"))
            {
                sb.Append($", mount point: \"{MountPoint}\"");
            }
            sb.Append($", version {(int) Info.Version} in {elapsed}");
            log.Information(sb.ToString());
            return(Files);
        }