Changes between Initial Version and Version 1 of Exposed_ConfigDB_Functions


Ignore:
Timestamp:
Feb 23, 2008, 4:19:00 AM (16 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Exposed_ConfigDB_Functions

    v1 v1  
     1The Javascript API is accessible via the g_ConfigDB global JS object. The three namespaces '''system''', '''mod''' and '''user''' exist as properties of the g_ConfigDB global object. Config variables can therefore be modified/accessed using eg '''g_ConfigDB.system!["sound.mastergain"]'''. Each namespace exports a couple of functions.
     2
     3== setFile ==
     4 * useVFS: true if the path is to be interpreted as a VFS path, false if it's a real FS path
     5 * path: the path
     6 * Returns nothing
     7
     8Set the file name to be used by the configuration namespace. Note that this doesn't automatically reload configuration values.
     9
     10== reload ==
     11 * No arguments
     12 * Returns true if successful
     13
     14Reload configuration from the file last set by setFile. Deletes all config values previously set, when successful. If an error occurs, the configuration is unchanged
     15
     16== writeFile ==
     17 * useVFS: true if the path is to be interpreted as a VFS path, false if it's a real FS path
     18 * path: the path
     19 * Returns true if successful
     20
     21Write all configuration values in the config namespace to a file on the disk.