Skip to content

Filesystem

Directory and embedded filesystem access.

KindDescription
fs.directoryDirectory-based filesystem
fs.embedRead-only embedded filesystem
- name: uploads
kind: fs.directory
directory: "/var/data/uploads"
auto_init: true
mode: "0755"
FieldTypeDefaultDescription
directorystringrequiredRoot path
auto_initboolfalseCreate directory if missing
modestring0755Unix permission mode (octal)

The mode restricts all file operations. Execute bits are added automatically when read bits are present.

Paths are normalized and validated. It is not possible to access files outside the configured root directory.
- name: static
kind: fs.embed

Embedded filesystems load from pack resources using the entry ID. They are read-only.

Embedded filesystems are an internal mechanism. Manual configuration is typically not required.

Both filesystem types implement:

OperationDirectoryEmbed
Open/ReadYesYes
StatYesYes
ReadDirYesYes
OpenFile (write)YesNo
RemoveYesNo
MkdirYesNo

Write operations on embedded filesystems return an error.

See Filesystem Module for file operations.