website: clarify `file()` base location

refs #5213
This commit is contained in:
Paul Hinze 2016-02-19 09:56:55 -06:00
parent 3e69e2eca6
commit a7b8a54a83
1 changed files with 5 additions and 1 deletions

View File

@ -129,7 +129,11 @@ The supported built-in functions are:
* `file(path)` - Reads the contents of a file into the string. Variables
in this file are _not_ interpolated. The contents of the file are
read as-is.
read as-is. The `path` is interpreted relative to the working directory.
[Path variables](#path-variables) can be used to reference paths relative
to other base locations. For example, when using `file()` from inside a
module, you generally want to make the path relative to the module base,
like this: `file("${path.module}/file")`.
* `format(format, args...)` - Formats a string according to the given
format. The syntax for the format is standard `sprintf` syntax.