All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.cryptomator.jfuse.mac.FuseMountImpl Maven / Gradle / Ivy

There is a newer version: 0.7.0
Show newest version
package org.cryptomator.jfuse.mac;

import org.cryptomator.jfuse.api.FuseMount;
import org.cryptomator.jfuse.mac.extr.fuse_h;

import java.lang.foreign.MemoryAddress;

record FuseMountImpl(MemoryAddress fuse, MemoryAddress ch, FuseArgs args) implements FuseMount {

	@Override
	public int loop() {
		if (args.multiThreaded()) {
			return fuse_h.fuse_loop_mt(fuse);
		} else {
			return fuse_h.fuse_loop(fuse);
		}
	}

	@Override
	public void unmount() {
		fuse_h.fuse_exit(fuse);
		fuse_h.fuse_unmount(args.mountPoint(), ch);
	}

	@Override
	public void destroy() {
		fuse_h.fuse_destroy(fuse);
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy