add created/modified/last accessed date#759
Open
ZeroSkill1 wants to merge 3 commits intod0k3:masterfrom
Open
Conversation
eku
reviewed
Jan 28, 2022
eku
left a comment
There was a problem hiding this comment.
Please check your settings for code indentation and spaces versus tabs.
Collaborator
|
Honestly I'd feel far more comfortable if this were pushed to http://elm-chan.org/fsw/ff/bd/ and the original author merged it in themselves, then we can update the library and use it too. |
Owner
|
@Wolfvak - I'm still unsure about this one. While I like the functionality, and think @ZeroSkill1 did a good implementation here, it will make FATFS updating hard. However an update may not be required, as most recent updates in FATFS deals with ExFAT, which we're not really interested in. @aspargas2 - what do you think? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I know this isn't exactly a good idea.
As mentioned in issue #758, GodMode9 currently does not show file creation date. It shows whatever FatFs returns in
FILINFO, which is creation date (in case of directories) and modification date (in case of files).According to this document, it's possible to get:
This may not seem like a good idea at first, but I got it working by modifying FatFs a tiny bit.
I made sure not to mess with anything that isn't related. I also made sure the dates are correct for drives and virtual drives, keeping the date that was previously intended to be shown.
FILINFOonly stored one Date and Time, so the first thing I did was adding new fields to store the other Dates/Times.Then, I made sure the Dates/Times were updated accordingly (for writes, file/dir creation, etc.).
This is what I got after that:

The data shown is identical to the data shown in the Windows Explorer "Properties" menu, so it is at the very least correct.
I have also tested the modified date, by creating a file, modifying it in the built in hex editor and saving it. The modified date/last access date is updated accordingly.
Overall it's a pretty minimal change. I understand that it may not be something you wish to add, but if it works, IMO, why not.
Let me know what you think.