first commit
This commit is contained in:
25
MxFilterGen2/IO/Cleaner.cs
Normal file
25
MxFilterGen2/IO/Cleaner.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MxFilterGen2.IO
|
||||
{
|
||||
internal class Cleaner
|
||||
{
|
||||
public static void CleanOut()
|
||||
{
|
||||
foreach (string f in JSON.settings.GetType())
|
||||
{
|
||||
String[] files = Directory.GetFiles($"out/{f}", "*.*");
|
||||
foreach (String file in files)
|
||||
{
|
||||
File.Delete(file);
|
||||
}
|
||||
File.Delete($"out/{JSON.settings.GetName()}_{f}.filter");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
23
MxFilterGen2/IO/Creator.cs
Normal file
23
MxFilterGen2/IO/Creator.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MxFilterGen2.IO
|
||||
{
|
||||
internal class Creator
|
||||
{
|
||||
public static void CreateBaseDir()
|
||||
{
|
||||
Message.CMW($"Checking and creating the base directories...", true, 2);
|
||||
if (!Directory.Exists($"filson")) { Directory.CreateDirectory($"filson"); }
|
||||
if (!Directory.Exists($"out")) { Directory.CreateDirectory($"out"); }
|
||||
foreach (string f in JSON.settings.GetType())
|
||||
{
|
||||
if (!Directory.Exists($"out/{f}")) { Directory.CreateDirectory($"out/{f}"); }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user