+
Point of view
All features
expanded class SYSTEM
Summary
This expanded class allow to execute system command and to get/set environment variables.
Direct parents
Insert list: ANY
Overview
Features
{ANY}
{}
get_environment_variable_in (variable: STRING, value: STRING): BOOLEAN
effective function
{ANY}
Try to get the value of the system environment variable or some variable in the system registry.
Gives False when no information about the variable is available; otherwise gives True, and the variable value is copied into value. Under UNIX-like system, this is in fact the good way to know about some system environment variable. Under Windows, this function also look in the system registry.
require
  • variable /= Void
  • value /= Void
get_environment_variable (variable: STRING): STRING
effective function
{ANY}
Try to get the value of the system environment variable or some variable in the system registry.
Gives Void when no information about the variable is available. Under-UNIX like system, this is in fact the good way to know about some system environment variable. Under Windows, this function also look in the system registry.
NOTE! since Liberty Eiffel "bell" (2015) the result is always the same (once) STRING, or Void.
require
  • variable /= Void
set_environment_variable (variable: STRING, value: STRING)
effective procedure
{ANY}
Try to assign the system environment variable with value.
require
  • variable /= Void
  • value /= Void
execute_command (system_command_line: ABSTRACT_STRING): INTEGER_32
effective function
{ANY}
To execute a system_command_line as for example, "ls -l" on UNIX.
The Result depends of the actual operating system. As an example, this execute feature is under UNIX the equivalent of a system call.
require
  • only_one_command: not system_command_line.has('%N')
execute_command_line (system_command_line: ABSTRACT_STRING)
effective procedure
{ANY}
The equivalent of execute_command without Result.
require
  • only_one_command: not system_command_line.has('%N')
basic_getenv (environment_variable: POINTER): POINTER
{}
To implement get_environment_variable.
basic_putenv (variable: POINTER, value: POINTER)
{}
To implement set_environment_variable.
basic_system (system_command_line: POINTER): INTEGER_32
{}