|
|
|
@ -3,6 +3,7 @@ package com.ruoyi.common.utils.file;
|
|
|
|
|
import java.io.*;
|
|
|
|
|
import java.net.URLEncoder;
|
|
|
|
|
import java.nio.charset.StandardCharsets;
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Base64;
|
|
|
|
|
import java.util.List;
|
|
|
|
@ -380,12 +381,13 @@ public class FileUtils
|
|
|
|
|
if (!directory.isDirectory()) {
|
|
|
|
|
throw new ServiceException(folderPath + "is not directory.");
|
|
|
|
|
}
|
|
|
|
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
if (directory.isDirectory()) {
|
|
|
|
|
File[] fileList = directory.listFiles();
|
|
|
|
|
assert fileList != null;
|
|
|
|
|
for (File file : fileList) {
|
|
|
|
|
if (!file.isDirectory()) {
|
|
|
|
|
scanFiles.add(file.getAbsolutePath());
|
|
|
|
|
scanFiles.add(file.getAbsolutePath() + "&" + dateFormat.format(file.lastModified()));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|