@tauri-apps/plugin-dialog - v2.4.2
    Preparing search index...

    Interface OpenDialogOptions

    Options for the open dialog.

    2.0.0

    interface OpenDialogOptions {
        title?: string;
        filters?: DialogFilter[];
        defaultPath?: string;
        multiple?: boolean;
        directory?: boolean;
        recursive?: boolean;
        canCreateDirectories?: boolean;
        pickerMode?: PickerMode;
    }
    Index

    Properties

    title?: string

    The title of the dialog window (desktop only).

    filters?: DialogFilter[]

    The filters of the dialog. On mobile platforms, if either: A) the pickerMode is set to media, image, or video -- or -- B) the filters include only either image or video mime types, the media picker will be displayed. Otherwise, the document picker will be displayed.

    defaultPath?: string

    Initial directory or file path. If it's a directory path, the dialog interface will change to that folder. If it's not an existing directory, the file name will be set to the dialog's file name input and the dialog will be set to the parent folder.

    On mobile the file name is always used on the dialog's file name input. If not provided, Android uses (invalid).txt as default file name.

    multiple?: boolean

    Whether the dialog allows multiple selection or not.

    directory?: boolean

    Whether the dialog is a directory selection or not.

    recursive?: boolean

    If directory is true, indicates that it will be read recursively later. Defines whether subdirectories will be allowed on the scope or not.

    canCreateDirectories?: boolean

    Whether to allow creating directories in the dialog. Enabled by default. macOS Only

    pickerMode?: PickerMode

    The preferred mode of the dialog. This is meant for mobile platforms (iOS and Android) which have distinct file and media pickers. If not provided, the dialog will automatically choose the best mode based on the MIME types or extensions of the filters. On desktop, this option is ignored.