| | |
| | | |
| | | private static int sharePath = 1; |
| | | |
| | | private final static double D92 = 92; |
| | | private final static double D90 = 90; |
| | | |
| | | private final static Log log = LogFactory.getLog(PathHelper.class); |
| | | |
| | |
| | | * 获取临时路径 |
| | | */ |
| | | public String getTempPath() { |
| | | String tempName = FileHelper.getTempPath(); |
| | | String tempName = StringHelper.YMD_HM_FORMAT.format(new Date()); |
| | | String tempPath = config.getTempPath(); |
| | | String path = tempPath + File.separator + tempName; |
| | | |
| | |
| | | } |
| | | |
| | | double ran = Math.random() * 99; |
| | | if (ran > D92) { |
| | | if (ran > D90) { |
| | | deleteOldPath(tempPath); |
| | | } |
| | | |