Restrict to specific file types
Array of file extensions (e.g., ["txt", "md"])
Self for chaining
Set whether multiple items can be selected
true to allow multiple selection (default: false)
Self for chaining
Set whether directories can be selected
true to allow directory selection (default: false)
Self for chaining
Set whether files can be selected
true to allow file selection (default: true)
Self for chaining
Set the starting directory
Path to directory (supports ~ for home)
Self for chaining
Set the message displayed in the picker
The message text
Self for chaining
Set the callback for file selection
Function receiving the selected path(s) or null if cancelled. Single selection receives a string; multiple selection receives an array of strings.
Self for chaining
Set whether to resolve symbolic links
true to resolve aliases (default: true)
Self for chaining
Show the file picker dialog
HSUIFilePicker
A file or directory selection dialog* Shows a standard macOS open panel for selecting files or directories. Supports multiple selection, file type filtering, and more.
Examples
File Picker
Directory Picker with Multiple Selection