aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Engine/ShiftFS/ShiftDrive.cs
diff options
context:
space:
mode:
authorJohn T <[email protected]>2017-11-05 18:47:46 -0500
committerJohn T <[email protected]>2017-11-05 18:47:46 -0500
commita10440a45c40652b13e883aec832a0c8ded685e8 (patch)
treeab64311e47f8e59c7c46cd50c94bec424165ecc2 /ShiftOS.Engine/ShiftFS/ShiftDrive.cs
parent019da5b9ebf67b758a31dd05c4b17de66fa682f2 (diff)
downloadshiftos-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/ShiftDrive.cs')
-rw-r--r--ShiftOS.Engine/ShiftFS/ShiftDrive.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/ShiftOS.Engine/ShiftFS/ShiftDrive.cs b/ShiftOS.Engine/ShiftFS/ShiftDrive.cs
new file mode 100644
index 0000000..cde9e8d
--- /dev/null
+++ b/ShiftOS.Engine/ShiftFS/ShiftDrive.cs
@@ -0,0 +1,20 @@
+using System.IO;
+using ShiftOS.Engine.Misc;
+
+namespace ShiftOS.Engine.ShiftFS
+{
+ public class ShiftDrive
+ {
+ internal ShiftDrive(DirectoryInfo dir)
+ {
+ Label = dir.Name;
+ var file = new IniFile(Path.Combine(dir.FullName, "driveinfo.ini"));
+ Letter = char.TryParse(file.ReadValue("", "DriveLetter"), out var letter) ? letter : '?';
+ Contents = new ShiftDirectory(dir.FullName);
+ }
+
+ public string Label { get; }
+ public char Letter { get; }
+ public ShiftDirectory Contents { get; }
+ }
+} \ No newline at end of file