os

Production-grade OS utilities for EZ — env, paths, processes, shell, clipboard, system info, and known directories (Windows FFI)

0 downloads owners: imabd645

Install

ez install os

Dependencies (1.0.0)

PackageRange
fs *

Readme

os v2.0

Production-grade OS utilities for the EZ Programming Language. Pure EZ over Win32 FFI — modular layout, structured errors, and expanded APIs.

Installation

ez install os

Quick start

use "os"

out os.platform()          # windows
out os.hostname()
out os.homedir()
out os.version()["name"]

os.env.set("APP_ENV", "production")
os.env.load(".env", { "override": false, "expand": true })

cfgPath = os.path.resolve("config\\app.json")
out os.path.extname(cfgPath)

result = os.process.run("echo hello", { "check": false })
out result["stdout"]

os.shell.open("https://github.com/imabd645/EZ-language")

Modules

ModulePurpose
os.envget/set/unset/has/require/all/expand/load/merge
os.pathjoin, joinAll, normalize, resolve, basename, dirname, extname, stem
os.processexec, run (structured result), system, pid, exit
os.clipboardread, write, clear
os.shellopen, explore, reveal
os.dirshome, temp, appData, localAppData, programFiles, desktop, ...
Top-level os.*platform, memory, arch, pid, version, cwd, sleep, ...

Layout

os/
  main.ez           Public facade + `export os`
  package.ez
  src/
    ffi.ez          All DLL bindings (internal)
    errors.ez       OSError, EnvError, ProcessError
    util.ez         Parsing + path helpers
    env.ez
    path.ez
    process.ez
    clipboard.ez
    shell.ez
    system.ez
    dirs.ez
  test_os.ez

.env format

Supports KEY=VALUE, export KEY=VALUE, # / // comments, quoted values, and inline comments.

Requirements

License

MIT

Versions

VersionSizeDownloadsPublished
1.0.0 8.1 KB 0 1 hour ago

Integrity

sha256  7be80f7fcfc79c80132f6dfff3a03fe91869bcf73b602104bd260cf3210c2c04