private static void InitNames(ArchiveBase aw) { if (loopsnames == null && namesnames == null && logonames == null) { string[] lof = aw.GetListOfFiles(); loopsnames = lof.Where(x => x.IndexOf(loops, StringComparison.OrdinalIgnoreCase) > -1).OrderBy(x => x, StringComparer.OrdinalIgnoreCase).ToList(); namesnames = lof.Where(x => x.IndexOf(names, StringComparison.OrdinalIgnoreCase) > -1).OrderBy(x => x, StringComparer.OrdinalIgnoreCase).ToList(); logonames = lof.Where(x => x.IndexOf("ff8.lzs", StringComparison.OrdinalIgnoreCase) > -1).OrderBy(x => x, StringComparer.OrdinalIgnoreCase).ToList(); } }
private ArchiveZzz(Memory.Archive archive, bool skipList = false) { ArchiveBase tempArchive = null; ParentPath = FindParentPath(archive); if (ParentPath != null && ParentPath.Count > 0) { foreach (Memory.Archive p in ParentPath) { if (p.IsDir) { tempArchive = ArchiveBase.Load(p); } else if (tempArchive != null) { throw new Exception("zzz shouldn't be inside an archive."); } } } Archive = archive; if (tempArchive != null) { archive.SetFilename(tempArchive.GetListOfFiles() .FirstOrDefault(x => x.IndexOf(archive.ZZZ, StringComparison.OrdinalIgnoreCase) > 0)); } Memory.Log.WriteLine($"{nameof(ArchiveZzz)}:: opening archiveFile: {archive}"); if (string.IsNullOrWhiteSpace(archive)) { return; } using (BinaryReader br = Open()) { if (br == null) { return; } ArchiveMap = Header.Load(br); } if (!skipList) { GetListOfFiles(); } IsOpen = true; }