recommend-video/src/main/java/com/iplatform/recvideo/util/SFTPUtil.java
@@ -221,9 +221,25 @@ if (!parentFile.exists()) { parentFile.mkdirs(); } if (isExistSftp(downloadFile)) { sftp.get(downloadFile, new FileOutputStream(file)); log.info("file:{} is download successful", downloadFile); } else { log.error("file:{} is not found", downloadFile); } } // 判断文件是否存在 public boolean isExistSftp(String filePach) { try { sftp.lstat(filePach); } catch (SftpException e) { log.info("isExistSftp()==> file:{} is not found", filePach); return false; } return true; } /** * 下载文件