Description
#6276 brought it up, but it's a more general concern. If we can solve the general problem then we don't need to do ugly hacks to pull out underlying, wrapped objects for users.
What is the proper way to enable timestamps through the existing FS interface. Setting a file's create/access/write time (as appropriate and available) on creation, at other times, and getting those values from the FS?
SDFat has a global dateTimeCallback() which returns two uint16_t
s in a very MSDOS-specific format, which is called by the underlying FS library when it needs to get a date/time:
https://github.com/greiman/SdFat/blob/master/examples/Timestamp/Timestamp.ino
The old Arduino SD.h fork also exposed these.
SPIFFS and LittleFS might be able to be extended to have date/time metadata, as well, so this should also be generally applicable.
@devyte, @me-no-dev , @d-a-v, any ideas, suggestions?