generated from ipfs/ipfs-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 95
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
feat: Support UnixFS mode and modification times in ipld dag and mfs #658
Merged
gammazero
merged 5 commits into
feat/unixfs15
from
feat/unixfs-mode-mtime-in-dag-and-files
Aug 13, 2024
Merged
feat: Support UnixFS mode and modification times in ipld dag and mfs #658
gammazero
merged 5 commits into
feat/unixfs15
from
feat/unixfs-mode-mtime-in-dag-and-files
Aug 13, 2024
Conversation
This file contains 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
Adds support for storing and retrieving file mode and last modification time. Support added to: Support added to: - Files - LinkFiles - Webfiles - Directories Tar archives are supported by the parent branch.
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## feat/unixfs15 #658 +/- ##
=================================================
+ Coverage 60.03% 60.10% +0.07%
=================================================
Files 240 240
Lines 30265 30583 +318
=================================================
+ Hits 18170 18383 +213
- Misses 10460 10556 +96
- Partials 1635 1644 +9
|
gammazero
added a commit
to ipfs/kubo
that referenced
this pull request
Aug 13, 2024
Replaces #7754 written by @kstuart - ipfs/boxo#653 - ipfs/boxo#658 - [X] Can `ipfs add` with preserved mode and/or last modification time - [X] on files - [X] on directories - [X] Can `ipfs add` with custom mode and/or last modification time - [X] on files - [X] on directories - [X] Can `ipfs get` restoring mode and/or last modification time - [X] on files - [X] on directories - [X] in archives - [X] Can `ipfs files chmod` to change mode - [X] on files - [X] on directories - [X] Can `ipfs files touch` to change last modification time - [X] on files - [X] on directories - [X] Automatically update the last modification time when file data is changed or truncated (e.g. `ipfs files write`) - [X] Can add files and directories with mode and/or modification time using multipart-form data - [X] `ipfs files stat` reports mode and last modification time **Note:** - [X] Adds support to `kubo/core/rpc` (may require additional tests). - ~ipfs/interface-go-ipfs-core/pull/66~ replace by this PR - ~ipfs/go-unixfs/pull/85~ replaced by: ipfs/boxo#658 - ~ipfs/go-mfs/pull/93~ replaced by: ipfs/boxo#658 - ~ipfs/go-ipfs-files/pull/31~ replaced by: ipfs/boxo#653 - ~ipfs/tar-utils/pull/11~ replaced by: ipfs/boxo#653 - When adding files and directories without opting to store a mode or modification time the same CIDs are generated that would have been created before this feature was implemented (opt-in). - The Go runtime currently has no native support for restoring file mode and modification time on symbolic-links, support for restoring the last modification time has been added for Linux distributions and the following BSDs: freebsd, netbsd, openbsd, dragonflybsd. - Automatically updating a modification time will only occur if a modification time was previously stored. - When creating an archive, for compatibility, time resolution is to the second; Nanoseconds are not supported. 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
23 tasks
6 tasks
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.
Adds support for storing and retrieving file mode and last modification time.
Support added for:
Tar archives are supported by the parent branch.
Replaced PRs: