ensureDir(..) 추가

master
mjkhan21 11 months ago
parent 2ccce2300c
commit 090e497b01

@ -1,5 +1,6 @@
package cokr.xit.foundation.component;
import java.io.File;
import java.util.Collections;
import java.util.Date;
import java.util.List;
@ -123,4 +124,16 @@ public abstract class AbstractBean extends AbstractComponent {
.map(num -> add(date, days > 0 ? num : -num))
.toList();
}
/** .
* .
* @param path
* @return
*/
protected static File ensureDir(String path) {
File dir = new File(path);
if (!dir.exists())
dir.mkdirs();
return dir;
}
}

@ -1,5 +1,6 @@
package cokr.xit.foundation.component;
import java.io.File;
import java.util.function.Supplier;
import javax.annotation.Resource;
@ -157,4 +158,13 @@ public abstract class AbstractServiceBean extends EgovAbstractServiceImpl {
protected Log log() {
return isEmpty(logName) ? log(getClass()) : Log.get(logName);
}
/** .
* .
* @param path
* @return
*/
protected static File ensureDir(String path) {
return AbstractBean.ensureDir(path);
}
}
Loading…
Cancel
Save