-
Notifications
You must be signed in to change notification settings - Fork 25
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
Unique identifiers for files and directories #482
Comments
These are good questions! Some quick thoughts below (with my usual disclaimer that I'm just exploring ideas here, not imposing what should happen with my CTO powers 😛)
Bash overwrites by default. The macOS Finder prompt the user if they want to overwrite or use a unique name. To make this even harder to chose between: because WNFS is concurrent, you also have the option of making it a concurrent/conflicting write.
If I'm understanding correctly, the unique content ID is intentionally lost when moving to the encrypted side. If it's later moved back to public, then it would have the same CID again.
I had assumed that this would live in the metadata header, but would love to know if others have thoughts! |
Good point. I'm starting to think we should not overwrite by default and be explicit, as we're leaning towards explicitness a bit more now in other areas of Webnative.
With the new rs-wnfs file system I think that's the way to go yeah. That said, couldn't hurt to think about some other patterns, as I'm sure there will be quite a few apps that have their own format (maybe they don't want to conform to one system, legacy reasons, etc) |
To make this explicit, we would add an option to What happens when an overwrite is attempted but not permitted? Webnative throws an exception?
It might be useful to consider interactive vs non-interactive interfaces. The macOS Finder prompt has a user present to determine what to do. Bash might not. Webnative is non-interactive. Are there other purely non-interactive systems that we could look at to see how they handle this? Another consideration is whether overwrites are destructive or not. In our current implementation, we have the As a wild idea/alternative to making overwrites explicit, how about if |
Addressed in #500 (see PR description)
Mutations return a CID that can be used for a unique name or just use a UUID.
A
You can now use the move method to move a file or directory from public to private and vice versa. Unique identifiers depend on the destination partition.
Use paths or the unique identifiers. |
We have CIDs and other unique identifiers in WNFS that point to the following things:
It should be made clear to users that de-duplication is achieved automatically with WNFS when using the public file system. The private file system does not have that because each file is encrypted with a different key. https://talk.fission.codes/t/does-wnfs-deduplicate-content/4067
Questions to answer and problems to solve:
fs.write()
by default not overwrite a file?The internal data structures should not be exposed. Instead, the interface should be easy to learn and be as helpful as possible to help people build various kinds of apps.
The text was updated successfully, but these errors were encountered: