private boolean tryTestReadWriteToFolder(final Folder folder, final boolean testWrite) {

        try {
            Uri testDoc = null;
            if (testWrite) {
                testDoc = create(folder, FileNameCreator.DEFAULT, false);
                if (testDoc == null) {
                    return false;
                }
            }

            //actually, on folder without write permission, we can not do much. Simply list the content...
            final List<FileInformation> files = list(folder);

            if (testWrite && files.isEmpty()) {
                return false;
            }

            return testDoc == null || delete(testDoc);
        } catch (RuntimeException re) {
            //if something unexpected happens, then we consider this folder non-readable/writeable
            Log.e("Error on testing read/write of folder " + folder + ", testWrite=" + testWrite, re);
            return false;
        }
    }
Tries to read and (optionally) write something to the given folder location, returns whether this was successful or not
main/src/main/java/cgeo/geocaching/storage/ContentStorage.java