Package inha.git.utils.file
Class FilePath
java.lang.Object
inha.git.utils.file.FilePath
FilePath는 파일을 저장하고 저장된 파일의 경로를 반환하는 클래스.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
deleteDirectory
(String dirPath) 디렉토리 삭제static boolean
deleteFile
(String filePath) 파일 삭제static String
파일을 저장하고 저장된 파일의 경로를 반환하는 메서드
-
Constructor Details
-
FilePath
public FilePath()
-
-
Method Details
-
storeFile
public static String storeFile(org.springframework.web.multipart.MultipartFile file, String uploadDir) 파일을 저장하고 저장된 파일의 경로를 반환하는 메서드- Parameters:
file
- 저장할 파일uploadDir
- 저장할 디렉토리- Returns:
- 저장된 파일의 경로
-
deleteFile
파일 삭제- Parameters:
filePath
- 삭제할 파일 경로- Returns:
- 파일 삭제 여부
-
deleteDirectory
디렉토리 삭제- Parameters:
dirPath
- 삭제할 디렉토리 경로- Returns:
- 디렉토리 삭제 여부
-