File tree Expand file tree Collapse file tree 4 files changed +6
-37
lines changed
src/main/java/org/cryptomator/integrations/mount Expand file tree Collapse file tree 4 files changed +6
-37
lines changed Original file line number Diff line number Diff line change 11package org .cryptomator .integrations .mount ;
22
33import java .nio .file .Path ;
4- import java .util .function .Consumer ;
54
65/**
76 * Handle to control the lifecycle of a mounted file system.
109 */
1110public interface Mount extends AutoCloseable {
1211
13- //TODO: either this or reveal method, not both
14- Path getAccessPoint ();
15-
16- //TODO: is this needed? why not just let the consumer reveal?
17- // See WebDAV: LinuxGioMounter and LinuxGvfsMounter -> no path, just a command
18- void reveal ( Consumer < Path > cmd );
12+ /**
13+ * Returns the absolute OS path, where this mount can be accessed.
14+ *
15+ * @return Absolute path to the mountpoint.
16+ */
17+ Path getMountpoint ( );
1918
2019 /**
2120 * Unmounts the mounted Volume.
Original file line number Diff line number Diff line change 44import org .jetbrains .annotations .Range ;
55
66import java .nio .file .Path ;
7- import java .util .function .Consumer ;
87
98/**
109 * Builder to mount a filesystem.
1413 */
1514public interface MountBuilder {
1615
17- //TODO: Idea: every setter verifies the set and can throw an IllegalArgumentException
18-
1916 /**
2017 * Sets the mount point.
2118 *
@@ -26,12 +23,6 @@ public interface MountBuilder {
2623 @ Contract ("_ -> this" )
2724 MountBuilder setMountpoint (Path mountPoint );
2825
29- // TODO: in what legacy mounter impl is this used?
30- @ Contract ("_ -> this" )
31- default MountBuilder setOnExitAction (Consumer <Throwable > onExitAction ) {
32- throw new UnsupportedOperationException ();
33- }
34-
3526 /**
3627 * Sets mount flags.
3728 *
Original file line number Diff line number Diff line change @@ -56,11 +56,6 @@ public enum MountFeature {
5656 */
5757 UNMOUNT_FORCED ,
5858
59- /**
60- * The mount supports triggering an event handler, which is somehow triggered at a specific time. // TODO what?
61- */
62- ON_EXIT_ACTION ,
63-
6459 /**
6560 * The provider supports {@link MountProvider#getDefaultPort()}
6661 * and the builder requires {@link MountBuilder#setPort(int)}.
Original file line number Diff line number Diff line change 99import java .util .Set ;
1010import java .util .stream .Stream ;
1111
12- // Vorteile:
13- // * IoC: Ein Provider weiß was er kann und was nicht!
14- // * Wegfall der komplizierten Mountpoint Logik
15- // * App beschränkt sich mehr auf GUI und Logik darum
16- // * Einfaches ändern/entfernen eines Providers
17- // * Mounten ist eine Systemintegration!
18- // * Tests!?
19- // * Illegal Mount Options Check?
20- // * In der GUI sieht der Nutzer sofort, was sich ändert.
21- // Nachteile:
22- // * Code-Duplikation
23- // * WebDAV-ServerPort? (-> Legacy Option in Preferences?)
24- // Ungeklärt:
25- // * Anzeigen von Fehler dem User (-> Translations nutzbar?)
26- // * Langfristiger Wechsel zu eigenständigen Prozessen?
27-
2812/**
2913 * A mechanism to mount a file system.
3014 *
You can’t perform that action at this time.
0 commit comments