| | |
| | | * @return |
| | | */ |
| | | public static Result isFTPFileExist(String uuid) { |
| | | String name = "ni"+uuid; |
| | | // System.out.println("uuid = " + uuid); |
| | | //创建 ftp 对象 |
| | | FTPClient ftp = new FTPClient(); |
| | |
| | | if (files.length==0){ |
| | | return new Result(400,null,"未读取到文件",null); |
| | | } else { |
| | | boolean flag = false; |
| | | for (FTPFile file : files){ |
| | | String fileName = file.getName(); |
| | | if (fileName.contains("ni")){ |
| | | if (fileName.equals(name)){ |
| | | System.out.println("-------接收到内网回传的文件: " + fileName); |
| | | //把文件下载到本地 |
| | | FtpUtil.downloadFtpFile(ftpHost, ftpUserNameIn, ftpPasswordIn, ftpPort, ftpPath, localPath, fileName); |