summaryrefslogtreecommitdiff
path: root/src/devices/file/directory_child.rs
diff options
context:
space:
mode:
authorBen Bridle <ben@derelict.engineering>2024-08-07 17:09:14 +1200
committerBen Bridle <ben@derelict.engineering>2024-08-07 17:09:14 +1200
commit38d40a2c5d4b553f524d87755b8e2e0e47928b8a (patch)
tree01fd01820be4219ca9f3dc7ad6e61eb183ade963 /src/devices/file/directory_child.rs
parent65b53003e8de9543ba25a3b3d3cace399b92dc1d (diff)
downloadbedrock-pc-38d40a2c5d4b553f524d87755b8e2e0e47928b8a.zip
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.
Diffstat (limited to 'src/devices/file/directory_child.rs')
-rw-r--r--src/devices/file/directory_child.rs35
1 files changed, 0 insertions, 35 deletions
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<Ordering> {
- 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,
- }
- }
-}