# listDirectory Canonical ID: `files.list`. ```text listDirectory(slot, relativePath) ``` Returns at most 256 sorted entry names in a selected directory. An empty relative path lists the root. This is not recursive and exposes no absolute host paths. Requires a directory slot and explicit permission. Returns a Map with `ok`, `status`, `value` and `error`. Check `ok` before using `value`; denial or an unavailable host is a structured failure. Requires Creator Pro or its technical trial for IDE/CLI run and build. Available on desktop, CLI and supported native exports; not in the public playground. Source remains editable in Learner. Generated apps have no Pliro licence check. ## Call example See the [advanced application guide](../guides/advanced-applications.md) for declarations, explicit host permissions and complete examples. This call assumes the required permissions; `handle` means the `value` from a successful open operation. ```text listDirectory("reports", "") ``` [Built-ins](README.md)