@jsvision/files / FileDialogOptions
Interface: FileDialogOptions
Defined in: files/src/dialog/file-dialog.ts:31
Construction options for FileDialog.
Properties
directory?
optionaldirectory?:Signal<string>
Defined in: files/src/dialog/file-dialog.ts:35
The current directory (default the filesystem's cwd). Shared with the listing and info pane.
filename?
optionalfilename?:Signal<string>
Defined in: files/src/dialog/file-dialog.ts:39
The filename field value (default an internal empty signal).
filter?
optionalfilter?: (entry) =>boolean
Defined in: files/src/dialog/file-dialog.ts:47
An extra predicate AND-ed with the wildcard when listing files.
Parameters
entry
Returns
boolean
fs?
optionalfs?:FileSystem
Defined in: files/src/dialog/file-dialog.ts:33
The filesystem to read and write through (default nodeFileSystem).
historyId?
optionalhistoryId?:number
Defined in: files/src/dialog/file-dialog.ts:49
The id keying this dialog's recent-path history (default a file-dialog id distinct from chdir).
inputName?
optionalinputName?:string
Defined in: files/src/dialog/file-dialog.ts:43
The filename label text (default '~N~ame'; wrap the hotkey letter in tildes).
onResolve?
optionalonResolve?: (path) =>void
Defined in: files/src/dialog/file-dialog.ts:53
Called when the dialog resolves — with the chosen absolute path, or null on cancel.
Parameters
path
string | null
Returns
void
save?
optionalsave?:boolean
Defined in: files/src/dialog/file-dialog.ts:41
Save mode — shows the OK/Replace/Clear/Cancel/Help strip instead of Open/Cancel/Help.
showError?
optionalshowError?: (message) =>void
Defined in: files/src/dialog/file-dialog.ts:51
Called to show an error (bad filename / directory). Wire it to errorBox in an app.
Parameters
message
string
Returns
void
title?
optionaltitle?:string
Defined in: files/src/dialog/file-dialog.ts:45
The dialog title (default 'Open a File', or 'Save File As' in save mode).
wildcard?
optionalwildcard?:Signal<string>
Defined in: files/src/dialog/file-dialog.ts:37
The file wildcard (default '*.*').