private static RipResult GFPackDump(BinaryReader br, uint header, string path, ContainerHandler handler) { if (header != 0x584C_4647) { return(new RipResult(RipResultCode.UnknownFormat)); } br.BaseStream.Position = 0; var gfp = new GFPack(br); var dir = Path.GetDirectoryName(path); var folder = Path.GetFileNameWithoutExtension(path); var resultPath = Path.Combine(dir, folder); Directory.CreateDirectory(resultPath); gfp.Dump(resultPath, handler); return(new RipResult(RipResultCode.Success) { ResultPath = resultPath }); }