private void ScanChunk() { _chunkFiles = new HashSet <string>(StringComparer.InvariantCultureIgnoreCase); foreach (string file in _archive.AllFileNames()) { string[] parts = file.Split('\\'); if (parts.Length > 2) { if (ExtraFolders.Contains(parts[0]) || Conditionals.Any(cf => cf.Folder.Equals(parts[0], StringComparison.InvariantCultureIgnoreCase))) { parts = parts.Skip(1).ToArray(); } else { continue; } } if (parts.Length < 2) { continue; } int chunk = parts[1].IndexOf(".chunk.", StringComparison.InvariantCultureIgnoreCase); if (chunk > 0) { _chunkFiles.Add(parts[0] + "\\" + parts[1].Substring(0, chunk)); } } System.Diagnostics.Debug.WriteLine(" Finished scan for chunks, found " + String.Join(",", _chunkFiles)); }
public IEnumerable <string> VerifySettings() { bool validexe = System.IO.File.Exists(FF7Exe); if (!validexe) { yield return("FF7 Exe: " + FF7Exe + " not found"); } foreach (var al in ProgramsToLaunchPrior.Where(s => !String.IsNullOrWhiteSpace(s.PathToProgram))) { if (!System.IO.File.Exists(al.PathToProgram)) { yield return("AlsoLaunch: " + al.PathToProgram + " not found"); } } if (!System.IO.Directory.Exists(MovieFolder)) { yield return("Movie Folder: " + MovieFolder + " not found"); } if (!System.IO.Directory.Exists(AaliFolder)) { yield return("Texture Path: " + AaliFolder + " not found"); } if (validexe) { string ff7folder = System.IO.Path.GetDirectoryName(FF7Exe); foreach (string extra in ExtraFolders.Where(s => !String.IsNullOrWhiteSpace(s))) { string path = System.IO.Path.Combine(ff7folder, extra); if (!System.IO.Directory.Exists(path)) { yield return("Extra Folder: " + path + " not found"); } } } }