From 301bdc77d2b5c9fdebaa7a78f9c66fbb2edfa68b Mon Sep 17 00:00:00 2001 From: Alkaline Thunder Date: Fri, 28 Dec 2018 01:24:02 -0500 Subject: [PATCH] Moving, copying and deleting. --- ShiftOS/ShiftOS/FilesystemContext.cs | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/ShiftOS/ShiftOS/FilesystemContext.cs b/ShiftOS/ShiftOS/FilesystemContext.cs index 1afe87e..5927782 100644 --- a/ShiftOS/ShiftOS/FilesystemContext.cs +++ b/ShiftOS/ShiftOS/FilesystemContext.cs @@ -129,5 +129,31 @@ namespace ShiftOS { Directory.CreateDirectory(MapToEnvironmentPath(InPath)); } + + public void MoveDirectory(string InPath, string OutPath) + { + Directory.Move(MapToEnvironmentPath(InPath), MapToEnvironmentPath(OutPath)); + } + + public void CopyFile(string InPath, string OutPath) + { + File.Copy(MapToEnvironmentPath(InPath), MapToEnvironmentPath(OutPath)); + } + + public void MoveFile(string InPath, string OutPath) + { + File.Move(MapToEnvironmentPath(InPath), MapToEnvironmentPath(OutPath)); + } + + public void DeleteFile(string InPath) + { + File.Delete(MapToEnvironmentPath(InPath)); + } + + public void DeleteDirectory(string InPath, bool Recurse = false) + { + Directory.Delete(MapToEnvironmentPath(InPath), Recurse); + } + } }