github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/website/content/docs/job-specification/hcl2/functions/file/abspath.mdx (about) 1 --- 2 layout: docs 3 page_title: abspath - Functions - Configuration Language 4 description: The abspath function converts the argument to an absolute filesystem path. 5 --- 6 7 # `abspath` Function 8 9 `abspath` takes a string containing a filesystem path and converts it 10 to an absolute path. That is, if the path is not absolute, it will be joined 11 with the job file directory. 12 13 Referring directly to filesystem paths in job arguments may cause spurious 14 diffs if the same configuration is applied from multiple systems or on 15 different host operating systems. We recommend using filesystem paths only for 16 transient values, such as the argument to 17 [`file`](/docs/job-specification/hcl2/functions/file/file) (where only the contents are then 18 stored). 19 20 ## Examples 21 22 ```shell-session 23 > abspath("nomad.txt") 24 /home/user/some/nomad-job/nomad.txt 25 ```