| | |
| | | file.mkdirs(); |
| | | } |
| | | |
| | | deleteOldPath(config.getTempPath()); |
| | | |
| | | return path; |
| | | } |
| | | |
| | | /** |
| | | * 获取临时路径名称 |
| | | */ |
| | | public String getTempPathName() { |
| | | String tempName = StringHelper.YMDHMS2_FORMAT.format(new Date()); |
| | | String path = config.getTempPath() + File.separator + tempName; |
| | | |
| | | File file = new File(path); |
| | | if (!file.exists() && !file.isDirectory()) { |
| | | file.mkdirs(); |
| | | } |
| | | |
| | | return tempName; |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | } |
| | | |
| | | deleteOldPath(config.getTempPath()); |
| | | |
| | | return getTempPath(); |
| | | } |
| | | |
| | | /** |
| | | * 获取临时路径名称 |
| | | */ |
| | | public String getTempPathName() { |
| | | String tempName = StringHelper.YMDHMS2_FORMAT.format(new Date()); |
| | | String path = config.getTempPath() + File.separator + tempName; |
| | | |
| | | File file = new File(path); |
| | | if (!file.exists() && !file.isDirectory()) { |
| | | file.mkdirs(); |
| | | } |
| | | |
| | | deleteOldPath(config.getTempPath()); |
| | | |
| | | return tempName; |
| | | } |
| | | |
| | | /** |
| | | * 删除旧路径 |
| | | */ |
| | | public void deleteOldPath(String tempPath) { |