Description
Gets all the sections of an initialization file. An initialization file assigns values to configuration variables, also known as entries, that are set when the system boots, the operating system comes up, or an application starts. An initialization file has the suffix INI; for example, boot.ini, Win32.ini.
Returns
An initialization file, as a structure whose format is as follows:
- Each initialization file section name is a key in the structure
- Each list of entries in a section of an initialization file is a value in the structure
If there is no value, returns an empty string.
Category
Function syntax
GetProfileSections(iniFile, [encoding]) |
See also
GetProfileString, SetProfileString
History
ColdFusion 11: Added the optional parameter, encoding.
ColdFusion MX: Added this function.
Parameters
Parameter |
Description |
---|---|
iniFile |
Absolute path (drive, directory, filename, extension) of initialization file; for example, C:\boot.ini |
encoding | (Optional) Encoding of the initialization (ini) file. For instance "UTF-8" For a list of encodings, see cffile action = "read". |
Example
GetProfileSections(expandPath("./russian.ini"),"UTF-8");
|