← All docs
opendir() — internals
Compiler internals for opendir(): lowering path, type checks, and runtime helpers.
opendir() — internals
Where it lives
- Signature:
src/builtins/io/opendir.rs - Lowering:
src/codegen/lower_inst/builtins/io.rs:3543 (lower_opendir) - Function symbol:
lower_opendir()
Lowering notes
- Lowers
opendir(path)and boxes the directory stream asresource|false.
Runtime helpers
The following runtime helpers are referenced:
__rt_opendir__rt_readdir__rt_user_wrapper_dir_readdir
Signature summary
function opendir(string $directory): mixed
What the type checker enforces
- Arity: takes exactly 1 argument.
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/filesystem/opendir.rs(eval_builtin!) - Dispatch hooks:
direct,values