ENV & STAT
ENV reads server-side environment variables. STAT returns file metadata. Both are live verbs — they read from the runtime environment at execution time.
ENV
Read a non-sensitive environment variable by name. Variables with prefixes SECRET_, KEY_, PASSWORD_, TOKEN_, API_KEY_, or PRIVATE_ are blocked.
ENV "PATH" SET ?path
AFTER EMIT ?path
Try it ›
ENV returns the server process environment. Values like
HOME and PWD reflect the runtime process, not a user home directory.STAT
Returns a metadata object for any path in /root/.
| Field | Type | Description |
|---|---|---|
name | text | Filename |
size | number | Size in bytes |
modified | number | Unix timestamp of last modification |
is_dir | boolean | True if path is a directory |
WRITE "hello world" INTO "/root/stat_test.txt"
AFTER STAT "/root/stat_test.txt" SET ?meta
AFTER EMIT ?meta
Try it ›
STAT "/root/stat_test.txt" SET ?meta
AFTER EMIT "Name: " & ?meta(name) & ", Size: " & ?meta(size) & " bytes, Dir: " & ?meta(is_dir)