SCOOP-compatible environment variable access for Eiffel.
Part of the Simple Eiffel ecosystem.
Production
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- 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
- Set environment variable (one-time setup for all simple_* libraries):
export SIMPLE_EIFFEL=D:\prod- Add to ECF:
<library name="simple_env" location="$SIMPLE_EIFFEL/simple_env/simple_env.ecf"/>Windows (uses Win32 API)
MIT License