nicholasbishop / ext4-view-rs

Rust library for reading ext2/ext4 filesystems
https://crates.io/crates/ext4-view
Apache License 2.0
8 stars 2 forks source link

Drop Eq/PartialEq/Ord/PartialOrd/Hash derives from DirEntry #208

Closed nicholasbishop closed 2 months ago

nicholasbishop commented 2 months ago

There's no single obviously correct key to use. Should it include just the name, or the full path? Should it include the inode? Should it include the file type, which may not hold meaningful data if the FILE_TYPE_IN_DIR_ENTRY feature isn't set? And this question will get slightly worse in a future commit when an Ext4 field is added to DirEntry.

So, drop the derives and let the user decide (e.g. by calling file_name() or path()). This also brings the type more in line with std::fs::DirEntry.