Skip to content
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

Set creation/modification time of volume on root #15

Merged
merged 1 commit into from
Feb 11, 2021
Merged

Set creation/modification time of volume on root #15

merged 1 commit into from
Feb 11, 2021

Conversation

qistoph
Copy link
Contributor

@qistoph qistoph commented Feb 10, 2021

Would you consider setting the creation and/or modification time attributes of the root "/" of the LittleFS to the timestamp of volume creation?

This PR adds:

  • actionPack: setting the attributes 't' and 'c' to the time of build
  • actionList: showing the creation time on list -l

Example output (diff):

 $ mklittlefs -p 256 -b 8192 -s 1024000 -l littlefs.bin
 5247    /client.js      Tue Dec 15 13:10:41 2020
 1747    /index.htm      Tue Dec 15 11:39:46 2020
 89476   /jquery-3.5.1.min.js    Mon May  4 23:02:39 2020
 71      /style.css      Fri Jul 17 13:57:50 2020
+Creation time:  Wed Feb 10 18:21:19 2021

Copy link
Owner

@earlephilhower earlephilhower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good, thanks!

I assume you're using something other than the ESP8266 LittleFS implementation? Because the core doesn't know about these tags and doesn't support getting date/time on Dirs AFAIR...

@earlephilhower earlephilhower merged commit 943d2f7 into earlephilhower:master Feb 11, 2021
@qistoph
Copy link
Contributor Author

qistoph commented Feb 11, 2021

I assume you're using something other than the ESP8266 LittleFS implementation? Because the core doesn't know about these tags and doesn't support getting date/time on Dirs AFAIR...

That's going to be my next PR. Working out the details...

@earlephilhower
Copy link
Owner

Ah, good. A new full toolchain build will be needed to get this into the core, but in the meantime you can manually build and install this version for your coding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants