-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement installation of the OpenSauce IDE to the HCE directory
- Loading branch information
1 parent
21afaf4
commit 504601f
Showing
5 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,8 @@ public class Backup | |
"data", | ||
"MaxScripts", | ||
"shaders", | ||
"tags" | ||
"tags", | ||
"OpenSauceIDE" | ||
}; | ||
|
||
/// <summary> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using System; | ||
using System.IO; | ||
|
||
namespace AmaiSosu | ||
{ | ||
/// <summary> | ||
/// Copy a directory and its contents. Adapted from the MSDN CopyAll method. | ||
/// <see cref="!:https://docs.microsoft.com/en-us/dotnet/api/system.io.directoryinfo" /> | ||
/// </summary> | ||
public static class Copy | ||
{ | ||
public static void All(DirectoryInfo source, DirectoryInfo target) | ||
{ | ||
if (string.Equals(source.FullName, target.FullName, StringComparison.CurrentCultureIgnoreCase)) return; | ||
|
||
// Check if the target directory exists, if not, create it. | ||
if (Directory.Exists(target.FullName) == false) Directory.CreateDirectory(target.FullName); | ||
|
||
// Copy each file into it's new directory. | ||
foreach (var fi in source.GetFiles()) | ||
{ | ||
Console.WriteLine(@"Copying {0}\{1}", target.FullName, fi.Name); | ||
fi.CopyTo(Path.Combine(target.ToString(), fi.Name), true); | ||
} | ||
|
||
// Copy each subdirectory using recursion. | ||
foreach (var diSourceSubDir in source.GetDirectories()) | ||
{ | ||
var nextTargetSubDir = target.CreateSubdirectory(diSourceSubDir.Name); | ||
All(diSourceSubDir, nextTargetSubDir); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters