Java File Mod Change chmod(final String path, final String mode)

Here you can find the source of chmod(final String path, final String mode)

Description

chmod

License

Apache License

Declaration

public static void chmod(final String path, final String mode) throws Exception 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static void chmod(final String path, final String mode) throws Exception {
        final String[] cmdarray = new String[] { "chmod", mode, path };
        Runtime.getRuntime().exec(cmdarray, null, null);
    }//from  w w w. j  a v a  2 s  .  co  m
}

Related

  1. chmod(@Nonnull File file, int mode)
  2. Chmod(boolean recursive, String permission, String directoryFile)
  3. chmod(File file, int mode)
  4. chmod(File file, String mode)
  5. chmod(final int mode, final File path)
  6. chmod(String filename, String perm)
  7. chmodX(String filename)