private Uri findInUriCache(final String key, final boolean needsWrite, final boolean validateCache) throws IOException {
        synchronized (this.folderUriCache) {
            final Uri cacheEntry = this.folderUriCache.get(key);
            if (cacheEntry == null) {
                return null;
            }

            if (validateCache && !isValidDirectoryUri(cacheEntry, needsWrite)) {
                this.folderUriCache.remove(key);
                return null;
            }
            return cacheEntry;
        }
    }
Gets the Folder File; creates it if necessary and performs all possible error handlings.
This is used for locations of Type DOCUMENT and FILE
<br
This method is in many respects the core method of this class

@param folder folder to get file for
@return file folder, or null if creation/retrieving was not at all possible
main/src/main/java/cgeo/geocaching/storage/DocumentContentAccessor.java