ssCore.INIFile.enumSections

Retrieve a list all the sections that exist in the specified INI file.


Availability:

First available in version 3.0 build 2039.


Input Parameters:

path - A fully qualified path to the INI file. This parameter supports monikers.

defaultValue - [Optional] - If no sections are found, this value will be returned in 'Result'. You should use a defaultValue that is different from what you expect to be returned (to help identify retrieval problems).

delimiter - [Optional] - A single character (or string) that will be used to separate section names in the results. Default value is ,.


Output Parameters:

result - A delimited list of section names from the INI file, or the supplied defaultValue.


Asynchronous Mode:

When this method is called asynchronously, a return object containing the output parameters is passed to the specified callback function.

ssCore.INIFile.enumSections( paramsObject [, callbackParamsObject] [, errorParamsObject] );


Synchronous Mode:

When this method is called synchronously, a return object containing the output parameters is returned to the caller immediately.

var returnObject = ssCore.INIFile.enumSections( paramsObject );


Notes:

You can use this function with INIFile.enumKeys to read the contents of any INI file without knowing what sections and keys are in it ahead of time.

                

Examples:

var return_obj = ssCore.INIFile.enumSections({path:"startdir://settings.ini", defaultValue:"?"});

ssDebug.trace(return_obj.result);