2222
2323import java .nio .file .Files ;
2424import java .nio .file .Path ;
25+ import java .util .Optional ;
2526import java .util .concurrent .Callable ;
2627import java .util .concurrent .TimeoutException ;
2728
3132
3233import picocli .CommandLine ;
3334import picocli .CommandLine .Command ;
34- import picocli .CommandLine .Option ;
3535import picocli .CommandLine .Model .CommandSpec ;
36+ import picocli .CommandLine .Option ;
3637import picocli .CommandLine .Parameters ;
3738import picocli .CommandLine .Spec ;
3839import uk .co .bithatch .tnfs .fuse .TNFSFUSEFileSystem ;
@@ -59,6 +60,9 @@ public static void main(String[] args) throws Exception {
5960 @ Option (names = { "-c" , "--create" }, description = "Create the mount point folder if it does not exist." )
6061 private boolean create ;
6162
63+ @ Option (names = {"--libpath" }, description = "The location of the libfuse library." , hidden = true )
64+ protected Optional <Path > libpath ;
65+
6266 @ Parameters (arity = "1" , index = "0" , description = "URI of TNFS resource to mount." )
6367 protected String remotePath ;
6468
@@ -84,6 +88,7 @@ protected void onStart() throws Exception {
8488 var uri = TNFSURI .parse (remotePath );
8589 var mount = doMount (uri , doConnect (uri ));
8690 var builder = Fuse .builder ();
91+ libpath .ifPresent (p -> builder .setLibraryPath (p .toString ()));
8792 var fuseOps = new TNFSFUSEFileSystem (mount , builder .errno ());
8893 try (var fuse = builder .build (fuseOps )) {
8994 Runtime .getRuntime ().addShutdownHook (new Thread (() -> {
0 commit comments