diff options
| author | Alkaline Thunder <[email protected]> | 2018-12-28 01:24:02 -0500 |
|---|---|---|
| committer | Alkaline Thunder <[email protected]> | 2018-12-28 01:24:02 -0500 |
| commit | 301bdc77d2b5c9fdebaa7a78f9c66fbb2edfa68b (patch) | |
| tree | d9f5bc2589ad3092dd218d2c237ca12b0dfdbc39 /ShiftOS | |
| parent | b71f731e2580718d4c527b84f41a67dd75285ae7 (diff) | |
| download | shiftos-challenge-301bdc77d2b5c9fdebaa7a78f9c66fbb2edfa68b.tar.gz shiftos-challenge-301bdc77d2b5c9fdebaa7a78f9c66fbb2edfa68b.tar.bz2 shiftos-challenge-301bdc77d2b5c9fdebaa7a78f9c66fbb2edfa68b.zip | |
Moving, copying and deleting.
Diffstat (limited to 'ShiftOS')
| -rw-r--r-- | ShiftOS/ShiftOS/FilesystemContext.cs | 26 |
1 files changed, 26 insertions, 0 deletions
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); + } + } } |
