public void setArgs(@Nullable final String startPath, final int mode,
                        final boolean allowMultiple, final boolean allowDirCreate,
                        final boolean allowExistingFile, final boolean singleClick) {
        // Validate some assumptions so users don't get surprised (or get surprised early)
        if (mode == MODE_NEW_FILE && allowMultiple) {
            throw new IllegalArgumentException(
                    "MODE_NEW_FILE does not support 'allowMultiple'");
        }
        // Single click only makes sense if we are not selecting multiple items
        if (singleClick && allowMultiple) {
            throw new IllegalArgumentException("'singleClick' can not be used with 'allowMultiple'");
        }
        // There might have been arguments set elsewhere, if so do not overwrite them.
        Bundle b = getArguments();
        if (b == null) {
            b = new Bundle();
        }

        if (startPath != null) {
            b.putString(KEY_START_PATH, startPath);
        }
        b.putBoolean(KEY_ALLOW_DIR_CREATE, allowDirCreate);
        b.putBoolean(KEY_ALLOW_MULTIPLE, allowMultiple);
        b.putBoolean(KEY_ALLOW_EXISTING_FILE, allowExistingFile);
        b.putBoolean(KEY_SINGLE_CLICK, singleClick);
        b.putInt(KEY_MODE, mode);
        setArguments(b);
    }
Set before making the fragment visible. This method will re-use the existing
arguments bundle in the fragment if it exists so extra arguments will not
be overwritten. This allows you to set any extra arguments in the fragment
constructor if you wish.
<p/>
The key/value-pairs listed below will be overwritten however.

@param startPath         path to directory the picker will show upon start
@param mode              what is allowed to be selected (dirs, files, both)
@param allowMultiple     selecting a single item or several?
@param allowDirCreate    can new directories be created?
@param allowExistingFile if selecting a "new" file, can existing files be chosen
@param singleClick       selecting an item does not require a press on OK
android/modules/module_filepicker/src/main/java/com/nononsenseapps/filepicker/AbstractFilePickerFragment.java