Skip to content

Instantly share code, notes, and snippets.

@davejlong
Created April 13, 2011 19:09
Show Gist options
  • Save davejlong/918179 to your computer and use it in GitHub Desktop.
Save davejlong/918179 to your computer and use it in GitHub Desktop.
Parses an INI file into a structure
public function parseINI(string codefile) void{
var i = '';
var codes = structNew();
local.sections = getProfileSections(getCodeFile());
for(local.section IN local.sections){
codes[local.section] = structNew();
local.keys = local.sections[local.section];
for(i=1;i LTE listLen(local.keys);i++){
codes[local.section][listGetAt(local.keys,i)] = getProfileString(getCodeFile(),local.section,listGetAt(local.keys,i));
}
}
return codes;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment