You want this module if you intend to write your own TNFS client in Java.
If you are looking for ready-made TNFS clients, see tnfs-java-cli
- Timeouts.
The library is on Maven Central, so just add to your POM, or your build systems equivalent. See the Home Page for the current version.
<dependency>
<groupId>uk.co.bithatch</groupId>
<artifactId>tnfs-java-client</artifactId>
<version>x.y.z<version>
</dependency>- Build a
TNFSClientusingTNFSClient.Builder. This connects you to a particular server. - From that, build a
TNFSMountusing theTNFSMount.Builderreturned byTNFSClient.mount(). This connects you to a particular mount shared by the server. - From that, access functions such as
list(),entries(),open()and more.
try(var clnt = new TNFSClient.Builder().
withHostname("terra").
withTcp().
build()) {
try(var mnt = clnt.mount().build()) {
try(var dirstr = mnt.list()) {
dirstr.forEach(d -> {
System.out.println(d);
});
}
}
}