-
Notifications
You must be signed in to change notification settings - Fork 65
Improvements #107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Improvements #107
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -606,7 +606,9 @@ impl<'a, IO: ReadWriteSeek, TP, OCC: OemCpConverter> DirEntry<'a, IO, TP, OCC> { | |
| self.data.is_file() | ||
| } | ||
|
|
||
| pub(crate) fn first_cluster(&self) -> Option<u32> { | ||
| /// Return first cluster of a entry. | ||
| #[must_use] | ||
| pub fn first_cluster(&self) -> Option<u32> { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why make it public? How the user can use this information? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I use it as a identifier (while a fs is mounted), since it's much simpler than filenames (due to lfn and only |
||
| self.data.first_cluster(self.fs.fat_type()) | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this is a good way to handle this situation. Do you know any other API that behaves like this? What problem does this change solve?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a side-effect of how the code is now written.
I can add an extra check to return an error in case of an empty string.
As it turns out, I use it no longer - so is (from my point) not neccessary.