private static List <FileInfo> PreTreatRom(FileInfo pRomFile) { if (BQSpecs.CompressionFileExtension.Contains(pRomFile.Extension)) { BQCompression.UnCompressionFile(pRomFile, new DirectoryInfo(BQDirectory.TempDir)); return(BQIO.GetRomFile(new DirectoryInfo(BQDirectory.TempDir))); } else { return(new List <FileInfo>() { pRomFile }); } }
public static List <FileInfo> FiledRomFile(FileInfo pRomFile) { List <FileInfo> lResult = new List <FileInfo>(); if (BQSpecs.RomFileExtension.Contains(pRomFile.Extension.ToLower())) { BQCompression.UnCompressionFile(pRomFile, new DirectoryInfo(BQDirectory.TempDir)); List <FileInfo> lUnCompressionFiles = BQIO.GetRomFile(new DirectoryInfo(BQDirectory.TempDir)); if (lUnCompressionFiles.Count == 0) { lResult = lUnCompressionFiles; } } else { lResult.Add(pRomFile); } return(lResult); }
public static List <RomInformation> LoadRom(FileInfo pRomFile, bool isCNRom = false) { List <RomInformation> lRomInformationList = new List <RomInformation>(); if (BQSpecs.CompressionFileExtension.Contains(pRomFile.Extension)) { BQCompression.UnCompressionFile(pRomFile, new DirectoryInfo(BQDirectory.TempDir)); List <FileInfo> lFileList = BQIO.GetRomFile(new DirectoryInfo(BQDirectory.TempDir)); foreach (var file in lFileList) { RomInformation tRomInformation = ParseRom(pRomFile, isCNRom); lRomInformationList.Add(tRomInformation); } } else { RomInformation tRomInformation = ParseRom(pRomFile, isCNRom); lRomInformationList.Add(tRomInformation); } return(lRomInformationList); }