Skip to content

Reads a file’s contents.

file_contents(path:string, [binary=bool]) -> blob|string

The file_contents function reads a file’s contents.

Absolute path of file to read.

Whether to read the file contents as a blob, instead of a string.

Defaults to false.

from {hostname: file_contents("/etc/hostname")}

Last updated: