Skip to content

Commit 8613fb0

Browse files
clarified different requirements to a mount point
1 parent 61f6ca0 commit 8613fb0

File tree

2 files changed

+41
-10
lines changed

2 files changed

+41
-10
lines changed

src/main/java/org/cryptomator/integrations/mount/MountFeature.java

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,40 @@ public enum MountFeature {
1111
* and the builder requires {@link MountBuilder#setMountFlags(String)}.
1212
*/
1313
MOUNT_FLAGS,
14-
MOUNT_POINT_EMPTY_DIR,
15-
MOUNT_POINT_DRIVE_LETTER,
16-
MOUNT_POINT_PATH_PREFIX,
14+
15+
/**
16+
* With the exception of a provider-supplied default mount point, the mount point must be an existing dir.
17+
* <p>
18+
* This option is mutually exclusive with {@link #MOUNT_WITHIN_EXISTING_PARENT}.
19+
*
20+
* @see #DEFAULT_MOUNT_POINT
21+
*/
22+
MOUNT_TO_EXISTING_DIR,
23+
24+
/**
25+
* With the exception of a provider-supplied default mount point, the mount point must be a non-existing
26+
* child within an existing parent.
27+
* <p>
28+
* This option is mutually exclusive with {@link #MOUNT_TO_EXISTING_DIR}.
29+
*
30+
* @see #DEFAULT_MOUNT_POINT
31+
*/
32+
MOUNT_WITHIN_EXISTING_PARENT,
33+
34+
/**
35+
* The mount point may be a drive letter.
36+
*
37+
* @see #MOUNT_TO_EXISTING_DIR
38+
* @see #MOUNT_WITHIN_EXISTING_PARENT
39+
*/
40+
MOUNT_AS_DRIVE_LETTER,
41+
42+
/**
43+
* The provider supports suggesting a default mount point via {@link MountProvider#getDefaultMountPoint(String)}.
44+
* <p>
45+
* The default mount point is guaranteed to be supported by the mount builder, regardless of its normal restrictions.
46+
*/
47+
DEFAULT_MOUNT_POINT,
1748

1849
/**
1950
* The builder supports {@link MountBuilder#setReadOnly(boolean)}
@@ -24,16 +55,15 @@ public enum MountFeature {
2455
* The mount supports {@link Mount#unmountForced()}.
2556
*/
2657
UNMOUNT_FORCED,
27-
ON_EXIT_ACTION,
2858

2959
/**
30-
* The provider supports {@link MountProvider#getDefaultPort()}
31-
* and the builder requires {@link MountBuilder#setPort(int)}.
60+
* The mount supports triggering an event handler, which is somehow triggered at a specific time. // TODO what?
3261
*/
33-
PORT,
62+
ON_EXIT_ACTION,
3463

3564
/**
36-
* The provider supports {@link MountProvider#getDefaultMountPoint(String)}
65+
* The provider supports {@link MountProvider#getDefaultPort()}
66+
* and the builder requires {@link MountBuilder#setPort(int)}.
3767
*/
38-
DEFAULT_MOUNT_POINT
68+
PORT
3969
}

src/main/java/org/cryptomator/integrations/mount/MountProvider.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ static Stream<MountProvider> get() {
6060
* A suitable mount point suggested by this provider.
6161
* <p>
6262
* Other than caller-provided mount points, the mount point suggested by this method can be
63-
* passed to {@link MountBuilder#setMountpoint(Path)} without further ado.
63+
* passed to {@link MountBuilder#setMountpoint(Path)} and is guaranteed to fulfill the builder's requirements
64+
* without further ado.
6465
*
6566
* @param mountPointSuffix String used in the generation of a mount point.
6667
* @return A path to a possible mount point.

0 commit comments

Comments
 (0)