Android Utililty Methods File Exist

List of utility methods to do File Exist

Description

The list of methods to do File Exist are organized into topic(s).

Method

booleancheckExtFile(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;
...
booleancheckFileExist(String path)
check File Exist
File file = new File(path);
return file.exists();
booleanexist(String filePath)
Check file existence
File f = new File(filePath);
if (!f.isFile()) {
    return false;
return true;
booleanexistFile(String folder)
exist File
File file = new File(folder);
if (file.isDirectory()) {
    return true;
} else {
    return false;
booleanexists(File file)
exists
return file.exists();
booleanexists(String fileName)
exists
return new File(fileName).exists();
booleanexists(String fileName)
exists
return exists(new File(fileName));
booleanexists(String fileName)
exists
File file = new File(fileName);
return file.exists();
booleanexists(String parent, String fileName)
exists
return new File(parent, fileName).exists();
booleanexists(String path)
exists
File f = new File(path);
return f.exists();