main
NintenHero 7 months ago committed by GitHub
parent 92f6a24432
commit 53c0d198e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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();
}

Loading…
Cancel
Save