← All docs
ftruncate() — internals
Compiler internals for ftruncate(): lowering path, type checks, and runtime helpers.
ftruncate() — internals
Where it lives
- Signature:
src/builtins/io/ftruncate.rs - Lowering:
src/codegen/lower_inst/builtins/io.rs:3206 (lower_ftruncate) - Function symbol:
lower_ftruncate()
Lowering notes
- Lowers
ftruncate(stream, size)through the shared fd truncate runtime helper.
Runtime helpers
No direct __rt_* helpers captured — the lowering is inlined or routes through another builtin.
Signature summary
function ftruncate(resource $stream, int $size): bool
What the type checker enforces
- Arity: takes exactly 2 arguments.
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/filesystem/ftruncate.rs(eval_builtin!) - Dispatch hooks:
direct,values