danda
September 2, 2020, 4:45pm
82
@happybeing so there’s something I’m unclear on that maybe you can test out, with the fuse filesystem template you created.
I’m curious what happens if the filesystem allows two dir entries with the same name to be created. Does fuse (or kernel) care?
My guess is that what would happen is:
readdir() returns all names, so ls
would show the dups. (unless some layer detects the dups and errors out?)
lookup() can only return a single entry, so it would find first match and dup(s) ignored.
This would effectively make dups visible, but inaccessible.
I’m not suggesting this is a good approach in any way, I’m just kind of curious what would happen.
My guess would be that the filesystem implementation determines this behaviour and would detect and refuse to create a duplicate (as in directory exists). FUSE can just pass things through.
Related: discussion of providing access to the Safe peer-to-peer filesystem for Emscripten:
Emscripten is a compiler tool which compiles many different languages to either JavaScript or Web Assembly (including for use in a web browser).
This means it can be used to pull together applications or libraries written in different languages, allowing parts to written in Rust to be combined with other languages: “Rust has Emscripten integration, with the wasm32-unknown-emscripten and asmjs-unknown-emscripten targets” (link )
Example
My use case is to be able to write new code in Rust along w…
cc @danda