Add support for a C library exposing the filesystem API #22
cipriancraciun
started this conversation in
Ideas
Replies: 2 comments
|
BTW, GitHub has just opened "Discussions" to all public repositories (it must be enabled from the repository settings). Thus for example this "issue" would have been better discussed in there, as it's not actually a "bug" or clear "feature request". |
0 replies
|
At least the C++ library already exists: Indeed, a C API could probably done quite easily (at least for the read part). |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I've taken a very quick look at the
dwarfsFUSE application, and from what I've seen the code is extremely simple and clean, and basically just delegates operations to afilesystem_v2object.So here is a thought: how about writing a small C (not C++) wrapper for the
filesystem_v2class. Basically instead offs.find(some_path)one would writedwarfs_fs2_find(fs, some_path); granted one now needs to provide similar accessor functions forentry_view(and derived).Basically the C library should cover only the file-system "read", and provide only the most basic operations, similar to what FUSE needs. (In fact I think one could just hack the
dwarfs.cppand just fake FUSE calls to obtain such a library.)What's the point you ask? :)
Using DwarFS library inside other applications to access files stored in a
dwarfsimage, without mounting it via FUSE.For example:
Why a C library and not C++? It's easier to integrate it in other languages like Go, Rust, Erlang, etc.
All reactions