Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.serceman:jnr-fuse:0.5.8'
}
dependencies {
implementation("com.github.serceman:jnr-fuse:0.5.8")
}
<dependency>
<groupId>com.github.serceman</groupId>
<artifactId>jnr-fuse</artifactId>
<version>0.5.8</version>
</dependency>
libraryDependencies += "com.github.serceman" % "jnr-fuse" % "0.5.8"
:dependencies [[com.github.serceman/jnr-fuse "0.5.8"]]
jnr-fuse is a FUSE implementation in java using Java Native Runtime (JNR).
The main goal of the project is to provide an easy way to create a high-performance filesystem in userspace.
FUSE (Filesystem in Userspace) is an OS mechanism for unix-like OS that lets non-privileged users create their own file systems without editing kernel code.
Java Native Runtime (JNR) is high-performance Java API for binding native libraries and native memory.
Prior to 0.5.5
, jnr-fuse was only available in JCenter. Due to sunsetting of JCenter, starting from 0.5.5
is available in maven central.
dependencies {
compile 'com.github.serceman:jnr-fuse:0.5.8'
}
<dependencies>
<dependency>
<groupId>com.github.serceman</groupId>
<artifactId>jnr-fuse</artifactId>
<version>0.5.8</version>
</dependency>
</dependencies>
For implementing your own filesystem you just need to extend FuseStubFS class and implement methods you need.
See some examples.
See blog article about the implementation
| Supported platforms | | | |---------------------------------------------------------------|-----|------| | Linux | x64 | x86 | | MacOS (via osxfuse) | x64 | x86 | | Windows (via winfsp)| x64 | n/a |
See instructions.