[ArchiveTools, TGZTest] Correct TGZ write, add test project (temp)

This commit is contained in:
Matt Nadareski
2016-08-24 20:33:35 -07:00
parent 8339dc1264
commit 1339e6e121
6 changed files with 201 additions and 37 deletions

33
TGZTest/TGZTest.cs Normal file
View File

@@ -0,0 +1,33 @@
using System.IO;
using SabreTools.Helper;
namespace SabreTools
{
public class TGZTest
{
public static void Main(string[] args)
{
Logger logger = new Logger(true, "tgztest.log");
logger.Start();
foreach (string arg in args)
{
string temparg = arg.Replace("\"", "").Replace("file://", "");
if (File.Exists(temparg))
{
ArchiveTools.WriteTorrentGZ(temparg, "tgz", logger);
}
else if (Directory.Exists(temparg))
{
foreach (string file in Directory.EnumerateFiles(temparg, "*", SearchOption.AllDirectories))
{
ArchiveTools.WriteTorrentGZ(file, "tgz", logger);
}
}
}
logger.Close();
}
}
}