Skip to content

@jsvision/files / ChDirDialogOptions

Interface: ChDirDialogOptions

Defined in: files/src/dialog/chdir-dialog.ts:25

Construction options for ChDirDialog.

Properties

directory?

optional directory?: Signal<string>

Defined in: files/src/dialog/chdir-dialog.ts:29

The current directory (default the filesystem's cwd). Shared with the tree.


fs?

optional fs?: FileSystem

Defined in: files/src/dialog/chdir-dialog.ts:27

The filesystem to read through (default nodeFileSystem).


historyId?

optional historyId?: number

Defined in: files/src/dialog/chdir-dialog.ts:33

The id keying this dialog's recent-path history (default a chdir id distinct from the file dialog).


onResolve?

optional onResolve?: (path) => void

Defined in: files/src/dialog/chdir-dialog.ts:37

Called when the dialog resolves — with the chosen absolute directory, or null on cancel.

Parameters

path

string | null

Returns

void


showError?

optional showError?: (message) => void

Defined in: files/src/dialog/chdir-dialog.ts:35

Called to show an error (unreadable directory). Wire it to errorBox in an app.

Parameters

message

string

Returns

void


title?

optional title?: string

Defined in: files/src/dialog/chdir-dialog.ts:31

The dialog title (default 'Change Directory').