library/src/main/java/net/rdrei/android/dirchooser/DirectoryChooserFragment.java
private boolean isValidFile(final File file) {
        return (file != null && file.isDirectory() && file.canRead() &&
                (mConfig.allowReadOnlyDirectory() || file.canWrite()));
    }
private boolean isValidFile(final File file) {
        return (file != null && file.isDirectory() && file.canRead() &&
                (mConfig.allowReadOnlyDirectory() || file.canWrite()));
    }
Returns true if the selected file or directory would be valid selection.