jFUSE allows you to develop FUSE 2.6 filesystems in Java (including the MacFUSE 2.0 extensions for Mac OS X). It also provides the programmer with access to relevant system constants and tools to make development a little easier.
The library consists of a native part (written in C++) and a Java part. Beginning with jFUSE 0.2, the native library has been tested on Mac OS X 10.4-10.6 and the latest versions of GNU/Linux (Debian,Ubuntu), OpenSolaris, FreeBSD and NetBSD (using librefuse).
- jFUSE 0.2 (jar file with library and example file systems, Java sources and compiled native library for Mac OS X)
- libjfuse 0.2 (JNI native library sources)
Sources now also available on GitHub.
HelloFS, the simplest filesystem you can find, and the other is a more complete in-memory filesystem called
TestFS. They can be found in the
I have created two additional filesystems for jFUSE as separate projects (download links coming soon):
- hfs-jfuse - A read only HFS/HFS+/HFSX filesystem driver.
- rarfs-jfuse - A filesystem for mounting RAR files, displaying their contents and allowing direct access to uncompressed entries.
In fact, the inspiration for jFUSE as a more general Java-FUSE layer came when working on the older 'rarfs' code, that also consisted of Java code bound to FUSE callbacks, but in a less reusable way.
For developers that quickly want to start creating jFUSE filesystems, all that's needed is to extend the class
org.catacombae.jfuse.FUSEFileSystemAdapterand override those methods that you want to implement (see
org.catacombae.jfuse.FUSE26Operationsfor a description of the operations that can be overridden).
Developers that want to take advantage of the MacFUSE extended callbacks introduced in MacFUSE 2.0 can override
org.catacombae.jfuse.MacFUSEFileSystemAdapter, which includes the FUSE 2.6 operations + the extended MacFUSE callbacks.
(Using the MacFUSE extended callbacks doesn't affect compatibility with non-MacFUSE platforms. They will simply not be invoked for those platforms.)
The Java API is not guaranteed to stay stable between releases, but it's also not likely to undergo any major changes.