Here you can find the source of chmod(File file, String mode)
Parameter | Description |
---|---|
file | a parameter |
mode | a parameter |
Parameter | Description |
---|---|
IOException | an exception |
public static void chmod(File file, String mode) throws IOException
//package com.java2s; import java.io.*; public class Main { /**//w ww . j a v a2 s . co m * @param file * @param mode * @throws IOException */ public static void chmod(File file, String mode) throws IOException { Runtime.getRuntime().exec(new String[] { "chmod", mode, file.getAbsolutePath() }); } }