10000 Add time and date to FS filesystem API · Issue #6311 · esp8266/Arduino · GitHub
[go: up one dir, main page]

Skip to content
Add time and date to FS filesystem API #6311
Closed
@earlephilhower

Description

@earlephilhower

#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_ts 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0