-
Notifications
You must be signed in to change notification settings - Fork 4
feat: support storing metadata in unixfs nodes #39
Conversation
Adds `mtime` and `mode` properties to `{path, content}` import entries
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At what point is the file data moved to a separate node?
File data will end up in a leaf node if the |
Do you think we should have a default like, do not reduce to self if mtime or mode are not the defaults and file size is beyond some threshold? |
This is AWESOME btw! |
Maybe, I'm not sure we should make decisions like that for the user, though I could be talked round. One thing is that in order to work out the size of the node we'd need to serialize it first, then we serialize again inside IPLD when writing it to disk. We already do this to get the size of Something I'd like to try is removing the Anyway, I'd like to resolve that in a separate PR to this one, but one that gets resolved before this goes out of the door in a js-IPFS release. |
I think we should provide good defaults. The majority of users are not going to know or care about this so we should make a effort to ensure their datas get good deduplications out of the box. We don't have to propose in this PR, but it would be good to get a follow up proposal PR so we can start considering it. Also on the table, just changing the default chunker to rabin or the new buzhash chunker. |
Adds
mtime
andmode
properties to{path, content}
import entries.