ListReadFromFile

InstallShield 2014 ยป InstallScript Language Reference

The ListReadFromFile function reads a text file into a list. After you load a text file into a list, you can use it for various functions in the setup, such as displaying a README file at the end of the setup or writing a string list to the disk with ListWriteToFile.

This function detects the newline characters at the end of each string and uses the characters as delimiters for each element in the list.

Note: The ListReadFromFile function operates on string lists and text files only.

Syntax

ListReadFromFile ( listID, szFile );

Parameters

ListReadFromFile Parameters

Parameter

Description

listID

Returns a list of the lines read from the file specified by szFile. The list identified by listID must already have been initialized by a call to ListCreate.

szFile

Specifies the fully qualified name of the file that will be read into the list.

Return Values

ListReadFromFile Return Values

Return Value

Description

0

Indicates that the function successfully read the lines of text in a file into a list.

ISERR_LIST_NOSUCHLIST (-501)

Indicates that a list with the specified ID does not exist. Valid list IDs are return values from the ListCreate function.

< 0

Indicates that the function was unable to read the lines from a text file into a list.

See Also