| Class | KConfig |
| In: |
lib/kreadwriteconfig.rb
|
| Parent: | Object |
Ensures the given file exists, is a file and is writable. If the file is in fact a relative path it will be hold relative to KDE‘s local config directory (usually $HOME/.kde/share/config).
KConfig.new("../apps/amarok/dbrc") => "/home/user/.kde/share/apps/amarok/dbrc"
If the initialization gets invoked with the relative variable set to true the path will be hold relative to the current working directory instead of KDE‘s local config.
KConfig.new("../apps/amarok/dbrc",true) => "/home/user/apps/amarok/dbrc"
Read config entries using kreadconfig.
To read the following config:
[KDE]
Color=true
KConfig.new("kderc").read("KDE","Color","bool") => true
Write config entries using kwriteconfig.
To write the following config:
[KDE]
Color=Blue
KConfig.new("kderc").write("KDE","Color","Blue")