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