Archived
Private
Public Access
1
0

Reworked MloCombiner

This commit is contained in:
2022-10-26 17:28:27 +02:00
parent e71b87d9fa
commit a565b9287c
85 changed files with 711 additions and 16483 deletions

View File

@@ -0,0 +1,17 @@
using System.IO;
namespace MloCombiner {
public static class DirectoryInfoExtensions {
public static void CopyFilesRecursively(this DirectoryInfo sourcePath, string targetPath) {
//Now Create all of the directories
foreach (string dirPath in Directory.GetDirectories(sourcePath.FullName, "*", SearchOption.AllDirectories)) {
Directory.CreateDirectory(dirPath.Replace(sourcePath.FullName, targetPath));
}
//Copy all the files & Replaces any files with the same name
foreach (string newPath in Directory.GetFiles(sourcePath.FullName, "*.*", SearchOption.AllDirectories)) {
File.Copy(newPath, newPath.Replace(sourcePath.FullName, targetPath), true);
}
}
}
}