From 38d40a2c5d4b553f524d87755b8e2e0e47928b8a Mon Sep 17 00:00:00 2001 From: Ben Bridle Date: Wed, 7 Aug 2024 17:09:14 +1200 Subject: Refactor the file device This is the Windows side of the refactoring job. The windows crate has been added as a dependency in order to get a list of available drives by drive letter, and a virtual top-level root directory has been implemented in the Windows code to make it possible for programs to hierarchically navigate between available drives. --- src/devices/file/directory_child.rs | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 src/devices/file/directory_child.rs (limited to 'src/devices/file/directory_child.rs') diff --git a/src/devices/file/directory_child.rs b/src/devices/file/directory_child.rs deleted file mode 100644 index 376ec7d..0000000 --- a/src/devices/file/directory_child.rs +++ /dev/null @@ -1,35 +0,0 @@ -use super::*; - -use std::cmp::Ordering; - - -pub struct DirectoryChild { - pub path: BedrockFilePath, - pub entry_type: EntryType, -} - - -// --------------------------------------------------------------------------- - -impl PartialEq for DirectoryChild { - fn eq(&self, other: &Self) -> bool { - self.entry_type == other.entry_type && self.path == other.path - } -} - -impl Eq for DirectoryChild {} - -impl PartialOrd for DirectoryChild { - fn partial_cmp(&self, other: &Self) -> Option { - Some(self.cmp(other)) - } -} - -impl Ord for DirectoryChild { - fn cmp(&self, other: &Self) -> Ordering { - match self.entry_type.cmp(&other.entry_type) { - Ordering::Equal => self.path.cmp(&other.path), - ordering => ordering, - } - } -} -- cgit v1.2.3-70-g09d2