Previous Topic: Creating Scenarios: create_scenario_ex()Next Topic: Adding Root Directories: add_root_dir()


Setting Root Directories: set_root_dir()

The set_root_dir() API function lets you edit the path of the root directory.

Arguments

The set_root_dir API function includes the arguments described in the following table:

Name

Type

Description

session_id

uint

The session ID that was returned by calling the create_session function API.

scenario_id

uint

The ID of the scenario.

host_index

uint

The index of the host that you want to set.

root_dir_index

uint

The index of the root directory, start from the zero, if you have two root directories, the indexes are 0 and 1.

root_dir

string

The folder name.

Note: This argument is required for only full system scenarios. However, this API function does not currently support setting root directories for full system scenarios.

Return Values

This function returns a value of true when the API call completes successfully. Otherwise, this function returns a value of false.

Note: The create_scenario_ex API creates only a skeleton of the scenario. You can call this API to set the root directory.

Example

uint master_host_index = 1;
get_mng().set_root_dir(_session_id, scenario_id, master_host_index, 0, "E:/test");