-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
35 lines (34 loc) · 1.07 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System;
using System.IO;
namespace HoloArchiver
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("HoloArchiver v1.0");
if (args.Length != 1)
{
Console.WriteLine("usage: HoloArchiver.exe file.h3d");
Console.ReadLine();
return;
}
string file = args[0];
string fileName = Path.GetFileNameWithoutExtension(file);
using (var archive = SimpleArchive.OpenOrCreate(file))
{
if (args.Length == 1)
{
Directory.CreateDirectory(fileName);
foreach (var entryName in archive.GetEntryNames())
{
Console.WriteLine(entryName);
File.WriteAllBytes(fileName + "\\" + entryName, archive.GetEntry(entryName));
}
Console.WriteLine("All files extracted.");
}
}
Console.ReadLine();
}
}
}