파일생성 추가
This commit is contained in:
@@ -2,7 +2,6 @@ package com.kamco.cd.kamcoback.common.utils;
|
||||
|
||||
import static java.lang.String.CASE_INSENSITIVE_ORDER;
|
||||
|
||||
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.DmlReturn;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
@@ -457,15 +456,13 @@ public class FIleChecker {
|
||||
return FIleChecker.getFilesFromAllDepth(dir, targetFileNm, extension, 100, "name", 0, 100);
|
||||
}
|
||||
|
||||
public static int getFileCountFromAllDepth(
|
||||
String dir, String targetFileNm, String extension) {
|
||||
public static int getFileCountFromAllDepth(String dir, String targetFileNm, String extension) {
|
||||
|
||||
List<FIleChecker.Basic> basicList =
|
||||
FIleChecker.getFilesFromAllDepth(dir, targetFileNm, extension);
|
||||
FIleChecker.getFilesFromAllDepth(dir, targetFileNm, extension);
|
||||
|
||||
return (int) basicList.stream()
|
||||
.filter(dto -> dto.getExtension().toString().equals(extension))
|
||||
.count();
|
||||
return (int)
|
||||
basicList.stream().filter(dto -> dto.getExtension().toString().equals(extension)).count();
|
||||
}
|
||||
|
||||
public static Long getFileTotSize(List<FIleChecker.Basic> files) {
|
||||
@@ -478,8 +475,7 @@ public class FIleChecker {
|
||||
return fileTotSize;
|
||||
}
|
||||
|
||||
public static boolean multipartSaveTo(MultipartFile mfile, String targetPath)
|
||||
{
|
||||
public static boolean multipartSaveTo(MultipartFile mfile, String targetPath) {
|
||||
Path tmpSavePath = Paths.get(targetPath);
|
||||
|
||||
boolean fileUpload = true;
|
||||
@@ -493,8 +489,7 @@ public class FIleChecker {
|
||||
return true;
|
||||
}
|
||||
|
||||
public static boolean validationMultipart(MultipartFile mfile)
|
||||
{
|
||||
public static boolean validationMultipart(MultipartFile mfile) {
|
||||
// 파일 유효성 검증
|
||||
if (mfile == null || mfile.isEmpty() || mfile.getSize() == 0) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user