Skip to content

Repository files navigation

simple_env logo

simple_env

Documentation | GitHub

License: MIT Eiffel Design by Contract SCOOP

SCOOP-compatible environment variable access for Eiffel.

Part of the Simple Eiffel ecosystem.

Status

Production

Overview

SIMPLE_ENV provides direct Win32 API calls with inline C for reliable, thread-safe environment manipulation. Unlike EXECUTION_ENVIRONMENT, it has no shared state issues.

local
    env: SIMPLE_ENV
do
    create env
    if attached env.get ("PATH") as path then
        print (path)
    end
    env.set ("MY_VAR", "my_value")
    print (env.expand ("%USERPROFILE%\Documents"))
end

Features

  • Get & Set - Read, write, delete environment variables
  • String Expansion - Expand %VAR% references in paths
  • Enumeration - List all variables or filter by prefix
  • SCOOP Safe - No shared state, concurrent-ready
  • Array Access - Use env["PATH"] notation

Installation

  1. Set environment variable (one-time setup for all simple_* libraries):
export SIMPLE_EIFFEL=D:\prod
  1. Add to ECF:
<library name="simple_env" location="$SIMPLE_EIFFEL/simple_env/simple_env.ecf"/>

Platform

Windows (uses Win32 API)

License

MIT License

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages