Android修改文件和文件夹权限

// 修改权限
public static void chmod(String permission, String path) {
	try {
		String command = "chmod " + permission + " " + path;
		Runtime runtime = Runtime.getRuntime();
		runtime.exec(command);
	} catch (IOException e) {
		e.printStackTrace();
	}
}
chmod("777", mContext.getFilesDir().toString());


posted @ 2013-04-22 16:48  javawebsoa  Views(268)  Comments(0Edit  收藏  举报