← All docs
dirname() — internals
Compiler internals for dirname(): lowering path, type checks, and runtime helpers.
dirname() — internals
Where it lives
- Signature:
src/builtins/io/dirname.rs - Lowering:
src/codegen/lower_inst/builtins/io.rs:4571 (lower_dirname) - Function symbol:
lower_dirname()
Lowering notes
- Lowers
dirname(path, levels?)through the target-aware runtime helper.
Runtime helpers
The following runtime helpers are referenced:
__rt_dirname__rt_dirname_levels
Signature summary
function dirname(string $path, int $levels = 1): string
What the type checker enforces
- Arity: takes 1–2 arguments (1 optional).
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/filesystem/dirname.rs(eval_builtin!) - Dispatch hooks:
direct,values