ConfigFile::loadFile

From King Arthur's Gold Wiki
Revision as of 15:48, 29 September 2012 by Shadlington (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Load the given .cfg file into the ConfigFile. Returns true if this was successful, otherwise false.


If you pass it a path that does not end with .cfg then .cfg will be appended. If the .cfg file does not exist then nothing will be loaded and the method will return false.

If the file is successfully loaded the new internal path of the ConfigFile will be updated to this file's path (and so calls to ConfigFile::saveFile will save to this new path).

You should note that it will not clear any key/values that are currently in the ConfigFile - all valid keys will be loaded from the new file but they will exist there in addition to any previously loaded/added keys.

bool loadFile( string file )

Object method of: ConfigFile