(File file)
| 237 | } |
| 238 | |
| 239 | public static File create(File file) { |
| 240 | try { |
| 241 | File parent = file.getParentFile(); |
| 242 | if (parent != null) mkdir(parent); |
| 243 | if (file.exists()) clear(file); |
| 244 | if (file.createNewFile()) Logger.t(TAG).d("Create:" + file); |
| 245 | file.setReadable(true); |
| 246 | file.setWritable(true); |
| 247 | file.setExecutable(true); |
| 248 | Shell.exec("chmod 777 " + file); |
| 249 | return file; |
| 250 | } catch (IOException e) { |
| 251 | return file; |
| 252 | } |
| 253 | } |
| 254 | } |