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
Support storing UnixFS 1.5 Mode and ModTime #7754
base: master
Are you sure you want to change the base?
Conversation
This commit introduces initial Mode and ModTime support for single filesystem files and webfiles. The ipfs add options --preserve-mode and --preserve-mtime are used to store the original mode and last modified time of the file being added, the options --mode, --mtime and --mtime-nsecs are used to store custom values. A custom value of 0 is a no-op. The preserve flags and custom options are mutually exclusive, if both are provided the custom options take precedence.
Thank you for submitting this PR!
Getting other community members to do a review would be great help too on complex PRs (you can ask in the chats/forums). If you are unsure about something, just leave us a comment.
We currently aim to provide initial feedback/triaging within two business days. Please keep an eye on any labelling actions, as these will indicate priorities and status of your contribution. |
This is needed for when ipfs get is used with the --output option to ensure the target for applying metadata is known.
…ixfs/ufs15 � Conflicts: � core/commands/files.go
Feature Progress
ipfs add
with preserved mode and/or last modification timeipfs add
with custom mode and/or last modification timeipfs get
restoring mode and/or last modification timeipfs files chmod
to change modeipfs files touch
to change last modification timeipfs files write
)ipfs files stat
reports mode and last modification timeRelated PRs
Implementation Notes
have been created before this feature was implemented (opt-in).
estoring the last modification time has been added for Linux distributions and the following BSDs: freebsd, netbsd, openbsd, dr
agonflybsd.
IPFS Add (CLI)
The
ipfs add
options--preserve-mode
and--preserve-mtime
are used to store the original mode and last modified time of the file being added, the options--mode
,--mtime
and--mtime-nsecs
are used to store custom values, a custom value of 0 is a no-op as is providing--mtime-nsecs
without--mtime
.The preserve flags and custom options are mutually exclusive, if both are provided the custom options take precedence.
Closes #6920