mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-08-18 21:26:02 +00:00
commit of the nioAdapter Interface, implementation enum and the commandFailedException
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package org.cryptomator.ui.model;
|
||||
|
||||
public class CommandFailedException extends Exception {
|
||||
|
||||
public CommandFailedException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public CommandFailedException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
|
||||
public CommandFailedException(String message, Throwable cause){
|
||||
super(message,cause);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package org.cryptomator.ui.model;
|
||||
|
||||
import org.cryptomator.cryptofs.CryptoFileSystem;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
|
||||
public interface NioAdapter {
|
||||
|
||||
void unlock(CryptoFileSystem fs);
|
||||
|
||||
void mount() throws CommandFailedException;
|
||||
|
||||
void unmount() throws CommandFailedException;
|
||||
|
||||
void stop();
|
||||
|
||||
String getFilesystemRootUrl();
|
||||
|
||||
default boolean isSupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
default boolean supportsForcedUnmount() {
|
||||
return false;
|
||||
}
|
||||
|
||||
default void unmountForced() throws CommandFailedException {
|
||||
throw new CommandFailedException("Operation not supported");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package org.cryptomator.ui.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public enum NioAdapterImpl {
|
||||
|
||||
WEBDAV,
|
||||
FUSE
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user