Contents

FileFilter

A file filter for a file open dialog.

Example 

import { app } from '@mobrowser/api';

const win = app.createWindow()
app.showOpenDialog({
  parentWindow: win,
  title: 'Open File',
  selectionPolicy: 'files',
  filters: [{ name: 'Text Files', extensions: ['txt'] }]
})

Properties 

name 

readonly name: string;

The name of the file filter.

extensions 

readonly extensions: string[];

The file extensions that the file filter matches.

Each extension should be a string in the format “ext”. E.g., “txt”, “png”, “jpg”, “pdf”, etc.