파일조회 수정
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user