Package alluxio.util
Class ModeUtils
- java.lang.Object
-
- alluxio.util.ModeUtils
-
@ThreadSafe public final class ModeUtils extends java.lang.Object
Utility methods for mode.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Mode
applyDirectoryUMask(Mode mode, java.lang.String authUmask)
Applies the default umask for newly created directories to this mode.static Mode
applyFileUMask(Mode mode, java.lang.String authUmask)
Applies the default umask for newly created files to this mode.static Mode
getUMask(java.lang.String confUmask)
Gets the file / directory creation umask.static short
protoToShort(alluxio.grpc.PMode pMode)
Used to get short value of a protoPMode
.
-
-
-
Method Detail
-
applyFileUMask
public static Mode applyFileUMask(Mode mode, java.lang.String authUmask)
Applies the default umask for newly created files to this mode.- Parameters:
mode
- the mode to updateauthUmask
- the umask to apply on the file- Returns:
- the updated object
-
applyDirectoryUMask
public static Mode applyDirectoryUMask(Mode mode, java.lang.String authUmask)
Applies the default umask for newly created directories to this mode.- Parameters:
mode
- the mode to updateauthUmask
- the umask to apply on the directory- Returns:
- the updated object
-
protoToShort
public static short protoToShort(alluxio.grpc.PMode pMode)
Used to get short value of a protoPMode
.- Parameters:
pMode
- proto mode- Returns:
- short value
-
-