Pick Files

Let the user pick files through win32.run Files Picker dialog.

await win32.pick_files(desc, exts, multiple);

Params

desc

String

Description of the files you want to pick. It will be displayed to the user.

let desc = 'Whatever, any files';

exts

[String]

Acceptable file extensions, case-insensitive. Each extension starts with a dot character.

let exts = ['.txt', '.html', '.md'];

Specify an empty array [] to accept any extension

multiple

Boolean

Default to true

Whether to allow the user to select multiple or single file.

Returns

Promise<[Object]>

A promise that resolves with an array of objects. Each object has the following structure.

This method will always return a promise of an array, regardless of the multiple value

Example

Last updated