add method

This commit is contained in:
Looly 2021-07-21 21:19:26 +08:00
parent 4c16ec55b4
commit 77e81d3f2b
3 changed files with 5 additions and 3 deletions

View File

@ -3,12 +3,13 @@
-------------------------------------------------------------------------------------------------------------
# 5.7.6 (2021-07-19)
# 5.7.6 (2021-07-21)
### 🐣新特性
* 【core 】 增加FieldsComparatorpr#374@Gitee
* 【core 】 FileUtil.del采用Files.delete实现
* 【core 】 改进Base64.isBase64方法增加等号判断issue#1710@Github
* 【core 】 Sftp增加syncUpload方法pr#375@Gitee
### 🐞Bug修复

View File

@ -1382,6 +1382,7 @@ public class FileUtil extends PathUtil {
* @param file 文件对象
* @param lastModifyTime 上次的改动时间
* @return 是否被改动
* @deprecated 拼写错误请使用{@link #isModified(File, long)}
*/
@Deprecated
public static boolean isModifed(File file, long lastModifyTime) {

View File

@ -17,7 +17,6 @@ import com.jcraft.jsch.SftpException;
import com.jcraft.jsch.SftpProgressMonitor;
import java.io.File;
import java.io.FileInputStream;
import java.io.OutputStream;
import java.nio.charset.Charset;
import java.util.ArrayList;
@ -429,9 +428,10 @@ public class Sftp extends AbstractFtp {
*
* @param file 文件或者文件夹
* @param remotePath 远程路径
* @since 5.7.6
*/
public void syncUpload(File file, String remotePath) {
if (!FileUtil.exist(file)) {
if (false == FileUtil.exist(file)) {
return;
}
if (file.isDirectory()) {