git clone git://github.com/EtiennePerot/fuse-jna.git
You now have a test filesystem in
You'll find a file called
hello.txt in there.
There's another example filesystem that you can use, which is writable:
net.fusejna.FuseFilesystemand override the methods you need (For convenience, there is an adapter called
Create an instance of your subclass, then call
The filesystem will be unmounted automatically at JVM shutdown time if possible. You can unmount it at runtime using
(Bonus) You can get logging for free by calling
.log(myLogger)on the filesystem instance.
fuse-jna was born out of the desire for no-compilation-required, no-bullshit, actually-working bindings to the FUSE library.
Originally built to make the OS X/Linux port of SrcDemo² possible, it was separated into its own library because I figured others would benefit from it.
I like Python, and I like using fuse.py when writing FUSE filesystems in Python. Thanks to
ctypes, it comes in just one file and that's all you need for nice 'n' straight Python bindings.
The goal of fuse-jna is to bring FUSE bindings to Java with the same simplicity.
To do that, it uses JNA, which itself was inspired by Python's
ctypes in terms of ease-of-use.
This being said, you can greatly increase throughput by preventing FUSE from chunking writes in tiny blocks, tweaking some JVM parameters, etc. See issue 31 for details.
Following fuse.py, fuse-jna should work with:
- OS X with MacFUSE/fuse4x/OSXFUSE on Intel architectures
- Linux with FUSE on Intel, ARM, and PowerPC architectures
- FreeBSD with FUSE on Intel architectures
- JGitFS: Displays Git branches, tags and commits as files
- GithubFS: Expose GitHub issues as files
- Java FUSE Mirror File System: Mirror filesystem stub implementation
- gdrivefs: Google Drive Linux client
- gyingpan: Google Drive client
- javafs: Port of fuse-jna to JNR instead of JNA.
Feel free to open an issue to get your project added here.