← All docs
basename() — internals
Compiler internals for basename(): lowering path, type checks, and runtime helpers.
basename() — internals
Where it lives
- Signature:
src/builtins/io/basename.rs - Lowering:
src/codegen/lower_inst/builtins/io.rs:4536 (lower_basename) - Function symbol:
lower_basename()
Lowering notes
- Lowers
basename(path, suffix?)through the target-aware runtime helper.
Runtime helpers
No direct __rt_* helpers captured — the lowering is inlined or routes through another builtin.
Signature summary
function basename(string $path, string $suffix = ''): string
What the type checker enforces
- Arity: takes 1–2 arguments (1 optional).