private void OpenVersionNca(NcaFile nca) { using IFileSystem fs = nca.data.OpenFileSystem(NcaSectionType.Data, IntegrityCheckLevel.ErrorOnInvalid); fs.OpenFile(out IFile version, new U8Span("/file"), OpenMode.Read).ThrowIfFailure(); version.GetSize(out long readSize); rawVersion = new byte[readSize]; version.Read(out long temp, 0, rawVersion); }
private void Indexer() { foreach (var file in Directory.EnumerateFiles(path, "*.nca").ToArray()) { NcaFile ncaFile = new NcaFile(); ncaFile.filename = file.Split(new char[] { '/', '\\' }).Last(); ncaFile.path = file; ncaFile.GenHash(); ncaFile.AddNcaInfo(); files.Add(ncaFile); } }
public NcaFile FindNca(string titleid, NcaContentType type) { string titleID = titleid.ToUpper(); NcaFile file = files.Find(x => x.titleId == titleID && x.header.ContentType == type); if (file == null) { Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine($"Could not find specified Program Id ({titleID})"); if (!Config.noExfat) { Console.WriteLine("Consider trying out the '--no-exfat' option"); } Console.WriteLine("Is your firmware dump valid?"); Console.ResetColor(); Environment.Exit(0); } return(file); }
public VersionExtractor(NcaFile nca) { versionMetaNca = nca; }
public VersionExtractor(NcaFile nca) { this.OpenVersionNca(nca); this.Parse(); }