Skip to content

os

Operating system interaction with native implementation. Includes command injection protection.

arc
use os

Functions

FunctionSignatureDescription
cwd() -> StringCurrent working directory
get_env(name) -> String | nilGet environment variable
env(name) -> String | nilGet environment variable (alias)
set_env(name, value) -> nilSet environment variable
list_dir(path) -> [String]List directory contents
is_file(path) -> BoolCheck if path is a file
is_dir(path) -> BoolCheck if path is a directory
mkdir(path) -> nilCreate directory
rmdir(path) -> nilRemove directory
remove(path) -> nilRemove file
rename(from, to) -> nilRename/move file
copy(src, dst) -> nilCopy file
file_size(path) -> IntGet file size in bytes
file_ext(path) -> StringGet file extension
join_path(...parts) -> StringJoin path segments
parent_dir(path) -> StringGet parent directory
basename(path) -> StringGet file name from path
exec(cmd) -> MapExecute shell command (10s timeout, injection-protected)
platform() -> StringOS platform name
home_dir() -> StringUser home directory
temp_dir() -> StringTemp directory path

A programming language designed by AI agents, for AI agents.