diff options
| author | John T <[email protected]> | 2017-11-05 18:47:46 -0500 |
|---|---|---|
| committer | John T <[email protected]> | 2017-11-05 18:47:46 -0500 |
| commit | a10440a45c40652b13e883aec832a0c8ded685e8 (patch) | |
| tree | ab64311e47f8e59c7c46cd50c94bec424165ecc2 /ShiftOS.Engine/ShiftFS/ShiftFSObject.cs | |
| parent | 019da5b9ebf67b758a31dd05c4b17de66fa682f2 (diff) | |
| download | shiftos-rewind-a10440a45c40652b13e883aec832a0c8ded685e8.tar.gz shiftos-rewind-a10440a45c40652b13e883aec832a0c8ded685e8.tar.bz2 shiftos-rewind-a10440a45c40652b13e883aec832a0c8ded685e8.zip | |
Added a half-complete ShiftFS and did some code cleanup
Diffstat (limited to 'ShiftOS.Engine/ShiftFS/ShiftFSObject.cs')
| -rw-r--r-- | ShiftOS.Engine/ShiftFS/ShiftFSObject.cs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/ShiftOS.Engine/ShiftFS/ShiftFSObject.cs b/ShiftOS.Engine/ShiftFS/ShiftFSObject.cs new file mode 100644 index 0000000..69750fa --- /dev/null +++ b/ShiftOS.Engine/ShiftFS/ShiftFSObject.cs @@ -0,0 +1,25 @@ +using System.IO; + +namespace ShiftOS.Engine.ShiftFS +{ + public abstract class ShiftFsObject + { + protected ShiftFsObject(string path) + { + if (!File.Exists(Path.Combine(ShiftFs.SavePath, path)) && !Directory.Exists(Path.Combine(ShiftFs.SavePath, path))) + { + throw new FileNotFoundException(); + } + } + + public string Name { get; set; } + public ShiftDirectory Parent { get; protected set; } + public string FullName { get; set; } + protected string FullDiskName { get; set; } + + public void Delete() + { + File.Delete(FullDiskName); + } + } +}
\ No newline at end of file |
