Config.findGlobal
Config.findGlobal().then(function(buf) {
// Use buf
});
Returns | |
---|---|
Buf |
Config.findProgramdata
Config.findProgramdata().then(function(buf) {
// Use buf
});
Returns | |
---|---|
Buf |
Config.findSystem
Config.findSystem().then(function(buf) {
// Use buf
});
Returns | |
---|---|
Buf |
Config.findXdg
Config.findXdg().then(function(buf) {
// Use buf
});
Returns | |
---|---|
Buf |
Config.openDefault
Config.openDefault().then(function(config) {
// Use config
});
Returns | |
---|---|
Config |
Config.openOndisk
Config.openOndisk(path).then(function(config) {
// Use config
});
Parameters | Type | |
---|---|---|
path | String | Path to the on-disk file to open |
Returns | |
---|---|
Config | The configuration instance to create |
Config#deleteEntry
var result = config.deleteEntry(name);
Parameters | Type | |
---|---|---|
name | String | the variable to delete |
Returns | |
---|---|
Number |
Config#deleteMultivar
var result = config.deleteMultivar(name, regexp);
Parameters | Type | |
---|---|---|
name | String | the variable’s name |
regexp | String | a regular expression to indicate which values to delete |
Returns | |
---|---|
Number | 0 or an error code |
Config#getBool
config.getBool(name).then(function(result) {
// Use result
});
Parameters | Type | |
---|---|---|
name | String | the variable’s name |
Returns | |
---|---|
Number |
Config#getEntry
config.getEntry(name).then(function(configEntry) {
// Use configEntry
});
Parameters | Type | |
---|---|---|
name | String | the variable’s name |
Returns | |
---|---|
ConfigEntry |
Config#getInt32
config.getInt32(name).then(function(result) {
// Use result
});
Parameters | Type | |
---|---|---|
name | String | the variable’s name |
Returns | |
---|---|
Number |
Config#getInt64
config.getInt64(name).then(function(result) {
// Use result
});
Parameters | Type | |
---|---|---|
name | String | the variable’s name |
Returns | |
---|---|
Number |
Config#getPath
config.getPath(name).then(function(buf) {
// Use buf
});
Parameters | Type | |
---|---|---|
name | String | the variable’s name |
Returns | |
---|---|
Buf | the buffer in which to store the result |
Config#getStringBuf
config.getStringBuf(name).then(function(buf) {
// Use buf
});
Parameters | Type | |
---|---|---|
name | String | the variable’s name |
Returns | |
---|---|
Buf | buffer in which to store the string |
Config#lock
config.lock().then(function(transaction) {
// Use transaction
});
Returns | |
---|---|
Transaction | the resulting transaction, use this to commit or undo the |
changes |
Config#setBool
config.setBool(name, value).then(function(result) {
// Use result
});
Parameters | Type | |
---|---|---|
name | String | the variable’s name |
value | Number | the value to store |
Returns | |
---|---|
Number | 0 or an error code |
Config#setInt32
config.setInt32(name, value).then(function(result) {
// Use result
});
Parameters | Type | |
---|---|---|
name | String | the variable’s name |
value | Number | Integer value for the variable |
Returns | |
---|---|
Number | 0 or an error code |
Config#setInt64
config.setInt64(name, value).then(function(result) {
// Use result
});
Parameters | Type | |
---|---|---|
name | String | the variable’s name |
value | Number | Long integer value for the variable |
Returns | |
---|---|
Number | 0 or an error code |
Config#setMultivar
config.setMultivar(name, regexp, value).then(function(result) {
// Use result
});
Parameters | Type | |
---|---|---|
name | String | the variable’s name |
regexp | String | a regular expression to indicate which values to replace |
value | String | the new value. |
Returns | |
---|---|
Number |
Config#setString
config.setString(name, value).then(function(result) {
// Use result
});
Parameters | Type | |
---|---|---|
name | String | the variable’s name |
value | String | the string to store. |
Returns | |
---|---|
Number | 0 or an error code |
Config#snapshot
config.snapshot().then(function(config) {
// Use config
});
Returns | |
---|---|
Config |
Config.LEVEL
Flag | Value |
---|---|
Config.LEVEL.PROGRAMDATA | 1 |
Config.LEVEL.SYSTEM | 2 |
Config.LEVEL.XDG | 3 |
Config.LEVEL.GLOBAL | 4 |
Config.LEVEL.LOCAL | 5 |
Config.LEVEL.APP | 6 |
Config.LEVEL.HIGHEST_LEVEL | -1 |
Config.MAP
Flag | Value |
---|---|
Config.MAP.FALSE | 0 |
Config.MAP.TRUE | 1 |
Config.MAP.INT32 | 2 |
Config.MAP.STRING | 3 |