Enum PosixFilePermission

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<PosixFilePermission>

    public enum PosixFilePermission
    extends java.lang.Enum<PosixFilePermission>
    PosixFilePermission is an enumeration containing all supported Posix file permissions.
    Since:
    1.0
    • Method Detail

      • values

        public static PosixFilePermission[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (PosixFilePermission c : PosixFilePermission.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static PosixFilePermission valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • contains

        public static boolean contains​(PosixFilePermission toFind,
                                       PosixFilePermission... options)
        Check if a sequence of PosixFilePermissions contains a specific option. If option or options is null, false will be returned.
        Parameters:
        toFind - the option to find.
        options - the options to check.
        Returns:
        if options contains option.
      • convertToOctal

        public static java.lang.String convertToOctal​(java.util.Set<PosixFilePermission> permissions)
      • convertFromOctal

        public static java.util.Set<PosixFilePermission> convertFromOctal​(java.lang.String octal)