note description: "The objects available from the environment at time of execution" library: "Free implementation of ELKS library" status: "See notice at end of class." legal: "See notice at end of class." date: "$Date: 2019-02-18 11:07:51 +0000 (Mon, 18 Feb 2019) $" revision: "$Revision: 102848 $" class interface EXECUTION_ENVIRONMENT create default_create feature -- Access Arguments: ARGUMENTS_32 -- Arguments that were used to start current execution. ensure instance_free: class current_working_path: PATH -- Directory of current execution. ensure instance_free: class result_not_void: Result /= Void Default_shell: STRING_32 -- Default shell ensure instance_free: class item (s: READABLE_STRING_GENERAL): detachable STRING_32 -- Value of s if it is an environment variable and has been set; -- void otherwise. require s_exists: s /= Void not_has_null_character: not s.has ('%U'.to_character_32) ensure instance_free: class Home_directory_path: detachable PATH -- Directory name corresponding to the home directory. require home_directory_supported: Operating_environment.home_directory_supported ensure instance_free: class User_directory_path: detachable PATH -- Directory name corresponding to the user directory -- On Windows: C:\Users\manus\Documents -- On Unix & Mac: $HOME -- Otherwise Void ensure instance_free: class Temporary_directory_path: detachable PATH -- Temporary directory name. -- On Windows: %SystemDrive%\Users\%USERNAME%\AppData\Local\Temp (%USERPROFILE%\AppData\Local\Temp). -- On Unix: /tmp and /var/tmp. -- On VMS: /sys$scratch -- Otherwise Void ensure instance_free: class Root_directory_name: STRING_8 -- Directory name corresponding to the root directory. require root_directory_supported: Operating_environment.root_directory_supported ensure instance_free: class result_not_void: Result /= Void starting_environment: HASH_TABLE [STRING_32, STRING_32] -- Table of environment variables when current process starts, -- indexed by variable name ensure instance_free: class result_attached: Result /= Void available_cpu_count: NATURAL_32 -- Number of available CPUs. ensure instance_free: class feature -- Status return_code: INTEGER_32 -- Status code set by last call to system or put feature -- Status setting change_working_path (path: PATH) -- Set the current directory to path put (value, key: READABLE_STRING_GENERAL) -- Set the environment variable key to value treating both -- value and key as Unicode characters. require key_exists: key /= Void key_meaningful: not key.is_empty not_key_has_null_character: not key.has ('%U'.to_character_32) value_exists: value /= Void not_value_has_null_character: not value.has ('%U'.to_character_32) ensure variable_set: return_code = 0 implies ((value.is_empty and then item (key) = Void) or else not value.is_empty and then attached item (key) as k and then k.same_string_general (value)) system (s: READABLE_STRING_GENERAL) -- Pass to the operating system a request to execute s interpreted as a Unicode string. -- If s is empty, use the default shell as command. require s_exists: s /= Void launch (s: READABLE_STRING_GENERAL) -- Pass to the operating system an asynchronous request to -- execute s interpreted as a Unicode string. -- If s is empty, use the default shell as command. require s_not_void: s /= Void ensure instance_free: class sleep (nanoseconds: INTEGER_64) -- Suspend thread execution for interval specified in -- nanoseconds (1 nanosecond = 10^(-9) second). require non_negative_nanoseconds: nanoseconds >= 0 ensure instance_free: class note copyright: "Copyright (c) 1984-2019, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software 5949 Hollister Ave., Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Website http://www.eiffel.com Customer support http://support.eiffel.com ]" end -- class EXECUTION_ENVIRONMENT
Generated by ISE EiffelStudio