파일조회 수정

This commit is contained in:
Moon
2025-12-18 18:25:35 +09:00
parent f2ee64242d
commit 92f379d21b
3 changed files with 43 additions and 10 deletions

View File

@@ -54,20 +54,29 @@ public class MapSheetMngService {
public FilesDto getFilesAll(SrchFilesDto srchDto) {
String dirPath = srchDto.getDirPath();
String extension = srchDto.getExtension();
String sortType = srchDto.getSortType();
int startPos = srchDto.getStartPos();
int endPos = srchDto.getEndPos();
File dir = new File(dirPath);
File[] fileList = dir.listFiles();
int limit = startPos - srchDto.getEndPos() + 1;
List<Basic> files = new ArrayList<>();
SimpleDateFormat dttmFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
List<FIleChecker.Basic> files = FIleChecker.getFilesFromAllDepth(
srchDto.getDirPath(),
"*",
srchDto.getExtension(),
100,
srchDto.getSortType(),
startPos,
limit);
int fileListPos = 0;
int fileTotCnt = 0;
long fileTotSize = 0;
int fileTotCnt = files.size();
long fileTotSize = FIleChecker.getFileTotSize(files);
//List<Basic> files = new ArrayList<>();
//SimpleDateFormat dttmFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//int fileListPos = 0;
//int fileTotCnt = 0;
//long fileTotSize = 0;
/*
if (fileList != null) {
if (sortType.equals("name")) {
Arrays.sort(fileList);
@@ -105,7 +114,10 @@ public class MapSheetMngService {
}
}
}
}
*/
return new FilesDto(dirPath, fileTotCnt, fileTotSize, files);
}