/// <summary> /// Dumps an ISO's contents from the specified ISO file to the provided output path. /// </summary> /// <param name="inputPath">Path of the ISO to dump</param> /// <param name="outputPath">Path to dump to</param> public static void DumpISOContents(string inputPath, string outputPath) { ISO iso = new ISO(); using (FileStream stream = new FileStream(inputPath, FileMode.Open, FileAccess.Read)) { EndianBinaryReader reader = new EndianBinaryReader(stream, Endian.Big); iso.DumpToDisk(iso.LoadISO(reader), outputPath); } }
/// <summary> /// Returns the root of the given ISO file in the form of a VirtualFilesystemDirectory. /// </summary> /// <param name="filePath">Path to the ISO file</param> /// <returns></returns> public static VirtualFilesystemDirectory LoadISO(string filePath) { VirtualFilesystemDirectory rootDir; using (FileStream stream = new FileStream(filePath, FileMode.Open, FileAccess.Read)) { EndianBinaryReader reader = new EndianBinaryReader(stream, Endian.Big); ISO iso = new ISO(); rootDir = iso.LoadISO(reader); } return(rootDir); }