|
|
|
@ -194,17 +194,8 @@ public class Path { |
|
|
|
|
|
|
|
|
|
|
|
public static File create(File file) throws Exception { |
|
|
|
public static File create(File file) throws Exception { |
|
|
|
try { |
|
|
|
try { |
|
|
|
if (!file.exists()) file.createNewFile(); |
|
|
|
|
|
|
|
if (!file.canWrite()) file.setWritable(true); |
|
|
|
if (!file.canWrite()) file.setWritable(true); |
|
|
|
return chmod(file); |
|
|
|
if (!file.exists()) file.createNewFile(); |
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
e.printStackTrace(); |
|
|
|
|
|
|
|
return file; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static File chmod(File file) { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
Shell.exec("chmod 777 " + file); |
|
|
|
Shell.exec("chmod 777 " + file); |
|
|
|
return file; |
|
|
|
return file; |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
|