This commit is contained in:
NintenHero 2024-04-19 16:40:43 -05:00 committed by GitHub
parent 92f6a24432
commit 53c0d198e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3,15 +3,15 @@ internal class Program
{
private static void Main(string[] args)
{
BinaryReader br = new BinaryReader(File.OpenRead(args[0]));
BinaryReader br = new(File.OpenRead(args[0]));
string path = Path.GetDirectoryName(args[0]) + "//" + Path.GetFileNameWithoutExtension(args[0]) + "//";
int size = br.ReadInt32();
for (int i = 0; i < size; i++)
int count = br.ReadInt32();
for (int i = 0; i < count; i++)
{
string name = br.ReadString();
Directory.CreateDirectory(Path.GetDirectoryName(args[0]) + "//" + Path.GetFileNameWithoutExtension(args[0]) + "//" + Path.GetDirectoryName(name));
using FileStream FS = File.Create(Path.GetDirectoryName(args[0]) + "//" + Path.GetFileNameWithoutExtension(args[0]) + "//" + name);
BinaryWriter bw = new(FS);
Directory.CreateDirectory(path + Path.GetDirectoryName(name));
BinaryWriter bw = new(File.Create(path + name));
bw.Write(br.ReadBytes(br.ReadInt32()));
bw.Close();
}