indexing description: "[ Gives the path to a directory where the application can save data. ]" date: "$Date$" revision: "$Revision$" class EM_USER_DIRECTORY inherit EM_SHARED_APPLICATION_ID create make feature -- Initialize make is -- creation procedure require application_id_set: application_id.item /= void do application_group_name := "EiffelMedia" create this_platform create this_environment if this_platform.is_unix then root_path := this_environment.get (unix_var) elseif this_platform.is_windows then root_path := this_environment.get (win_var) end end feature -- Access application_group_name: STRING item: STRING is -- get the user directory path require app_id_set: application_id.item /= void application_group_name_set: application_group_name /= void do if this_platform.is_unix then Result := root_path + "/."+ application_group_name +"/" + application_id.item + "/" elseif this_platform.is_windows then Result := root_path + "/"+ application_group_name +"/" + application_id.item + "/" end end root_path: STRING feature -- Element change set_application_group_name (an_application_group_name: like application_group_name) is -- Set `application_group_name' to `an_application_group_name'. do application_group_name := an_application_group_name ensure application_group_name_assigned: application_group_name = an_application_group_name end feature {NONE} -- Implementation this_platform: PLATFORM this_environment: EXECUTION_ENVIRONMENT unix_var: STRING is "HOME" -- Environment Variable to determine path on unix systems win_var: STRING is "APPDATA" -- Environment Variable to determine path on windows systems end