java.lang.Object
org.cryptomator.jfuse.api.FileModes
Utility for parsing and serializing file permissions to and from octal int representation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intMask of the 9 permission bits in a file mode integer -
Method Summary
Modifier and TypeMethodDescriptionstatic intfromPermissions(Set<PosixFilePermission> permissions) Serializes the given permissions into a integer.static Set<PosixFilePermission> toPermissions(int mode) Parses permissions from the 9 least significant bits of the file mode.
-
Field Details
-
PERMISSIONS_MASK
public static final int PERMISSIONS_MASKMask of the 9 permission bits in a file mode integer- See Also:
-
-
Method Details
-
toPermissions
Parses permissions from the 9 least significant bits of the file mode.- Parameters:
mode- File mode- Returns:
- Parsed permissions
-
fromPermissions
Serializes the given permissions into a integer.- Parameters:
permissions- Permissions- Returns:
- An integer with the
permission bitsset accordingly
-