protected String getTypeForName(@NonNull final String name) {
        final int lastDot = name.lastIndexOf('.');
        if (lastDot >= 0) {
            final String extension = name.substring(lastDot + 1).toLowerCase(Locale.getDefault());
            final String mime = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);
            if (mime != null) {
                return mime;
            }
        }
        return "application/octet-stream";
    }
creates physical folder on device if it is not already there anyway
main/src/main/java/cgeo/geocaching/storage/AbstractContentAccessor.java