# dialog/file-save Open a save-as dialog. ## Syntax
[dialog/file-save "Title" ?start-dir ?filename]
## Parameters - `"Title"` — dialog title (defaults to `"Save As"`) - `?start-dir` — optional starting directory (defaults to `"."`) - `?filename` — optional default filename ## Examples
[dialog/file-save "Save"]
[dialog/file-save "Save" "/home/ritchie"]
[dialog/file-save "Save" "/tmp" "notes.txt"]
[dialog/file-save %{ :title "Save" :start-dir "/tmp" :filename "x.txt" }]
[dialog/file-save :save-as "Save" "." "x.txt"]      # explicit id → :data~id :save-as
## Returns In TUI hosts the call returns immediately — `true` when an explicit id was given (leading keyword or `:id` in the spec map), else the numeric request-id. Behavior depends on the build: - TUI (`retro`, `retra`) — returns immediately; the result arrives later as a `:message` event with topic `"dialog-result"` and a structured `:data` map `%{ :id :value :cancelled }` where `:value` carries the target path (empty when cancelled). - `deft` scripting binary — blocks on stdin, returns the path. ## See Also `dialog/file-open`, `dialog/menu`, `dialog/confirm`