Class FilePermissions
java.lang.Object
org.springframework.boot.buildpack.platform.io.FilePermissions
Utilities for dealing with file permissions and attributes.
- Since:
- 2.5.0
- Author:
- Scott Frederick
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
posixPermissionsToUmask
(Collection<PosixFilePermission> permissions) Return the integer representation of a set of Posix file permissions, where the integer value conforms to the umask octal notation.static int
umaskForPath
(Path path) Return the integer representation of the file permissions for a path, where the integer value conforms to the umask octal notation.
-
Method Details
-
umaskForPath
Return the integer representation of the file permissions for a path, where the integer value conforms to the umask octal notation.- Parameters:
path
- the file path- Returns:
- the integer representation
- Throws:
IOException
- if path permissions cannot be read
-
posixPermissionsToUmask
Return the integer representation of a set of Posix file permissions, where the integer value conforms to the umask octal notation.- Parameters:
permissions
- the set ofPosixFilePermission
s- Returns:
- the integer representation
-