Dagger filesystem Stat calls
Introduced 2026-01-07 · score 0.96
HOW TO USE IT
When inspecting filesystem status in a Dagger module, call `directory.stat(path: <path>)` or `container.stat(path: <path>)`. Read the returned `Stat` fields for the status details documented for your API version.
directory.stat(path: "/file.txt")container.stat(path: "/file.txt")WHY THIS HELPS
Inspect a file or directory's filesystem status while implementing or debugging a Dagger module.
REQUIREMENTS AND LIMITATIONS
- Version: v0.19.9
- path (required): Path to stat; e.g. `/file.txt`.
- doNotFollowSymlinks: If true, do not follow symlinks; defaults to false.
- Stat.fileType: File type.
- Stat.name (required): File name.
- Stat.permissions (required): Permission bits.
- Docs conflict: The inspected official documentation is for Dagger v0.19.11, newer than the card's v0.19.9. The current API reference lists `fileType`, `name`, and `permissions` on `Stat`; it does not list a size field. This differs from the release note's example of status including size, so size is omitted.
FIRST-PARTY EVIDENCE
- https://github.com/dagger/dagger/releases/tag/v0.19.9
- https://github.com/dagger/dagger/pull/11403
- https://docs.dagger.io/0.19.11/reference/api/directory/
- https://docs.dagger.io/0.19.11/reference/api/container/
- https://docs.dagger.io/api/reference/
Check the installed version and the source before using it. Entry JSON