Added DictionaryFile, ListFile, LogFile

master
Trivernis 8 years ago
parent 5e11d3e9ac
commit ab36940eaf

@ -8,7 +8,7 @@ using System.Xml;
namespace GAIA namespace GAIA
{ {
public class Files namespace Files
{ {
//A File to save dictionaries //A File to save dictionaries
public class DictionaryFile public class DictionaryFile
@ -426,5 +426,39 @@ namespace GAIA
save(); save();
} }
} }
public class IOAdditions
{
public IOAdditions()
{
}
public bool copyDirectory(string sourcepath, string targetpath)
{
return copy(new DirectoryInfo(sourcepath), targetpath);
}
private bool copy(DirectoryInfo di, string target)
{
try
{
target += "/"+di.Name;
foreach(var file in di.GetFiles())
{
file.CopyTo(target + "/" + file.Name);
}
foreach(var dir in di.GetDirectories())
{
copy(dir, target);
}
return true;
}
catch { return false; }
}
}
} }
} }

Loading…
Cancel
Save