diff options
Diffstat (limited to 'ShiftOS.Engine/ShiftFS/ShiftDrive.cs')
| -rw-r--r-- | ShiftOS.Engine/ShiftFS/ShiftDrive.cs | 20 |
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 |
