OpenDialogResult
The result of a file open dialog.
import { OpenDialogResult } from '@mobrowser/api';
Example
import { app, OpenDialogResult } from '@mobrowser/api';
const result: OpenDialogResult = await app.showOpenDialog({
title: 'Open File',
selectionPolicy: 'files',
features: { allowMultiple: true }
})
if (!result.canceled) {
console.log('Selected paths:', result.paths)
}
Properties
paths
readonly paths: string[];
The paths that were selected.
canceled
readonly canceled: boolean;
Whether the dialog was canceled.