List of utility methods to do File Exist
boolean | checkExtFile(String ext, String fileName) check Ext File if (ext == null) return false; String[] exts = ext.split(";"); String file = fileName.toLowerCase(); for (String element : exts) if (file.endsWith("." + element)) return true; return false; ... |
boolean | checkFileExist(String path) check File Exist File file = new File(path); return file.exists(); |
boolean | exist(String filePath) Check file existence File f = new File(filePath); if (!f.isFile()) { return false; return true; |
boolean | existFile(String folder) exist File File file = new File(folder); if (file.isDirectory()) { return true; } else { return false; |
boolean | exists(File file) exists return file.exists();
|
boolean | exists(String fileName) exists return new File(fileName).exists(); |
boolean | exists(String fileName) exists return exists(new File(fileName)); |
boolean | exists(String fileName) exists File file = new File(fileName); return file.exists(); |
boolean | exists(String parent, String fileName) exists return new File(parent, fileName).exists(); |
boolean | exists(String path) exists File f = new File(path); return f.exists(); |