Class Chmod


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

      Constructors 
      Constructor Description
      Chmod()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int chmod​(java.io.File file, java.lang.String mode)  
      private static boolean setPermissions​(java.io.File file, char permChar, boolean userOnly)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • CHMOD_API_AVAILABLE

        private static final boolean CHMOD_API_AVAILABLE
      • setWritable

        private static final java.lang.reflect.Method setWritable
      • setReadable

        private static final java.lang.reflect.Method setReadable
      • setExecutable

        private static final java.lang.reflect.Method setExecutable
    • Constructor Detail

      • Chmod

        public Chmod()
    • Method Detail

      • chmod

        public static int chmod​(java.io.File file,
                                java.lang.String mode)
      • setPermissions

        private static boolean setPermissions​(java.io.File file,
                                              char permChar,
                                              boolean userOnly)