Reads a file’s contents.
file_contents(path:string, [binary=bool]) -> blob|stringDescription
Section titled “Description”The file_contents function reads a file’s contents.
path: string
Section titled “path: string”Absolute path of file to read.
binary = bool (optional)
Section titled “binary = bool (optional)”Whether to read the file contents as a blob, instead of a string.
Defaults to false.
Examples
Section titled “Examples”Read a text file
Section titled “Read a text file”from {hostname: file_contents("/etc/hostname")}