# The File Dialog

_Peios / Using Peios / Everyday Applications_

> Understand what an application does when it asks for a file or a folder.

The shared file dialog lets an application ask you for a file to open, a
name to save, or a folder. The dialog chooses a path; the calling
application opens, writes, or uses that path. A successful selection does
not grant the caller new filesystem rights.

The dialog shows folders first and filters files by the kind the caller
requested. **Up**, **Home**, and the path field change the location.
**Hidden files** includes names beginning with a dot. In save mode, the
selected kind can supply a missing extension, and an occupied name asks
for confirmation.

An application that asks for a folder gets a dialog that shows folders
only. **Choose Folder** chooses the folder you picked or, with nothing
picked, the folder you are in; the dialog shows which path it will choose
before you press it. Only an application that asks for a folder can be
given one: opening and saving never return a folder, and opening one goes
into it instead.

The dialog can also create a folder, rename an entry, or delete it.
Deletion is real: a directory goes with its contents. The dialog runs as
you and disables operations it cannot perform.

Canceling, pressing **Esc**, or closing the dialog reports cancellation to
the caller. The dialog also ends when its caller closes the input
channel. It is not meant to be started as a standalone launcher task.

Developers use the file-choosing protocol or the companion Rust client.
The protocol's shared contract belongs to the Peios userspace
specifications; this suite owns the dialog implementation. See
`gxwi-file-dialog(1)` for transport and lifecycle details.

The selection protocol returns a UTF-8 path. A path that cannot be
represented as UTF-8 is refused explicitly and leaves the dialog open.
Local operations still identify the original entry independently of its
displayed label. Rename refuses an occupied destination, including one
created after the dialog's initial check.
