public void chmodFiles(){
Process p = null;
try {
p = Runtime.getRuntime().exec("chmod 777 productinfo");
file.createNewFile();
Runtime.getRuntime().exec("chmod 777 "+file.getAbsolutePath());
int status = p.waitFor();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
android java调用命令行给文件赋权限
最新推荐文章于 2023-02-06 12:43:55 发布