类 FilePermissions

java.lang.Object
cn.taketoday.buildpack.platform.io.FilePermissions

public final class FilePermissions extends Object
Utilities for dealing with file permissions and attributes.
从以下版本开始:
4.0
作者:
Scott Frederick, Harry Yang
  • 构造器详细资料

    • FilePermissions

      private FilePermissions()
  • 方法详细资料

    • umaskForPath

      public static int umaskForPath(Path path) throws IOException
      Return the integer representation of the file permissions for a path, where the integer value conforms to the umask octal notation.
      参数:
      path - the file path
      返回:
      the integer representation
      抛出:
      IOException - if path permissions cannot be read
    • posixPermissionsToUmask

      public static 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.
      参数:
      permissions - the set of PosixFilePermissions
      返回:
      the integer representation
    • permissionToUmask

      private static int permissionToUmask(Collection<PosixFilePermission> permissions, PosixFilePermission execute, PosixFilePermission write, PosixFilePermission read)