client_agent/src/main/java/com/munjaon/client/util/FileUtil.java
2024-07-18 06:16:12 +09:00

38 lines
709 B
Java

package com.munjaon.client.util;
import java.io.File;
/**
* 파일 관련 유틸리티 클래스
* @author JDS
*/
public class FileUtil {
public static boolean exists(String sFile) {
return exists( new File(sFile) );
}
public static boolean exists(File file) {
return file.exists();
}
public static boolean mkdirs(String sPath) {
return mkdirs(sPath, false);
}
public static boolean mkdirs(String sPath, boolean isFilePath) {
File file = new File(sPath);
if( isFilePath ) {
file = file.getParentFile();
}
if( file.exists() ) {
return true;
}
return file.mkdirs();
}
}