Class Chmod

java.lang.Object
jnr.posix.util.Chmod

public class Chmod extends Object
Honor semantics of chmod as best we can in pure Java. Note, this uses reflection to be more tolerant of different Java versions.
  • Field Details

    • CHMOD_API_AVAILABLE

      private static final boolean CHMOD_API_AVAILABLE
    • setWritable

      private static final Method setWritable
    • setReadable

      private static final Method setReadable
    • setExecutable

      private static final Method setExecutable
  • Constructor Details

    • Chmod

      public Chmod()
  • Method Details

    • chmod

      public static int chmod(File file, String mode)
    • setPermissions

      private static boolean setPermissions(File file, char permChar, boolean userOnly)