readFile assumes path relative to /content and not /

Is there a way to avoid having to specify the full pathname in readFile?

I’m looking to include code examples and would like to use a relative path so I can easily copy and rearrange files. So far, the only solution I’ve found is readFile “/full/path/from/content/myfile”. But this ties the reference to the physical path “/full/path/from/content”.

I’ve tried, in a shortcode, to use (printf “%s/%s” .File.Dir $filename) but this failed with “can’t evaluate field File in type *hugolib.ShortcodeWithPage”

There’s got to be a way to specify a path relative to the containing document somehow… is there?