package com.gkhy.safePlatform.doublePrevention.utils; import java.io.File; public class FileOptUtils { public static Boolean isDirExists(String filename) { try { File file = new File(filename); if (file.exists()) { if (file.isDirectory()) { return true; } else { return false; } } else { file.mkdir(); return true; } } catch (Exception e) { return false; } } }