public static void changeExternalPrivateCgeoDir(final SettingsActivity fromActivity, final String newExtDir) {
        final Progress progress = new Progress();
        progress.show(fromActivity, fromActivity.getString(R.string.init_datadirmove_datadirmove), fromActivity.getString(R.string.init_datadirmove_running), ProgressDialog.STYLE_HORIZONTAL, null);
        AndroidRxUtils.bindActivity(fromActivity, Observable.defer(() -> {
            final File newDataDir = new File(newExtDir, GEOCACHE_DATA_DIR_NAME);
            final File currentDataDir = new File(getExternalPrivateCgeoDirectory(), GEOCACHE_DATA_DIR_NAME);
            Log.i("Moving geocache data to " + newDataDir.getAbsolutePath());
            final File[] files = currentDataDir.listFiles();
            boolean success = true;
            if (ArrayUtils.isNotEmpty(files)) {
                progress.setMaxProgressAndReset(files.length);
                progress.setProgress(0);
                for (final File geocacheDataDir : files) {
                    success &= FileUtils.moveTo(geocacheDataDir, newDataDir);
                    progress.incrementProgressBy(1);
                }
            }

            Settings.setExternalPrivateCgeoDirectory(newExtDir);
            Log.i("Ext private c:geo dir was moved to " + newExtDir);

            externalPrivateCgeoDirectory = new File(newExtDir);
            return Observable.just(success);
        }).subscribeOn(Schedulers.io())).subscribe(success -> {
            progress.dismiss();
            final String message = success ? fromActivity.getString(R.string.init_datadirmove_success) : fromActivity.getString(R.string.init_datadirmove_failed);
            SimpleDialog.of(fromActivity).setTitle(R.string.init_datadirmove_datadirmove).setMessage(TextParam.text(message)).show();
        });
    }
Returns the external public cgeo directory, something like <pre>/sdcard/cgeo</pre>.
It falls back to the internal cgeo directory if the external is not available.
main/src/main/java/cgeo/geocaching/storage/LocalStorage.java