On this page:
def
8.12

9.3 Runtime Paths🔗ℹ

 import: rhombus/runtime_path package: rhombus-prototype

definition

def id:

  body

  ...

Defines id to provide an absolute path that refers to the file name produced by the body sequence as interpreted relative to the source module.

An unutual property of runtime_path.def is that the body sequence is used in both a run-time context and a meta context, so it must be valid for both. The meta interpretation is used for tasks like creating a standalone executable to ensure that referenced files are accessible at run time.

> import:

    rhombus/meta open

    rhombus/runtime_path

> runtime_path.def image_file: "file.png"