| | |
| | | throw new ServerException("未获取到该日志路径!"); |
| | | } |
| | | FileObjectBO fileObjectBO = new FileObjectBO(); |
| | | String logFullPaths = localLogVO.getLogFullPaths(); |
| | | String logFullPaths = this.convertWindows2Linux(localLogVO.getLogFullPaths()); |
| | | // 判断是否是父目录 |
| | | if(!localLogVO.getHasChildren()){ |
| | | //只下载一个日志文件 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 下载之前将windows的路径格式转换为linux |
| | | * @param fullPath |
| | | * @return |
| | | */ |
| | | private String convertWindows2Linux(String fullPath){ |
| | | String os = System.getProperty("os.name").toLowerCase(); |
| | | if (!os.contains("win")) { |
| | | fullPath = fullPath.replace("\\", "/"); |
| | | } |
| | | return fullPath; |
| | | } |
| | | |
| | | /** |
| | | * 删除日志文件 |
| | | * @param localLogVO 文件全路径集合 |
| | | * @throws ServerException |