Android Utililty Methods Directory Validate

List of utility methods to do Directory Validate

Description

The list of methods to do Directory Validate are organized into topic(s).

Method

booleandirWritable(File dirFile)
dir Writable
try {
    if (!dirFile.isDirectory())
        return false;
    File testFile = File.createTempFile("test", "tmp", dirFile);
    testFile.delete();
    return true;
} catch (IOException e) {
    return false;
...
booleanisValidDirectory(String path)
A simple check that the directory path is a valid one for the current OS.
File file = new File(path);
try {
    file.getCanonicalPath();
    return true;
} catch (IOException e) {
    return false;