The filename of the keyfile to use is given by filename.
All settings read to or written from the backend must fall under the
path given in root_path (which must start and end with a slash and
not contain two consecutive slashes). root_path may be "/".
If root_group is non-NULL then it specifies the name of the keyfile
group used for keys that are written directly below root_path. For
example, if root_path is "/apps/example/" and root_group is
"toplevel", then setting the key "/apps/example/enabled" to true will
cause the following to appear in the keyfile:
[toplevel] enabled=true
If root_group is NULL then it is not permitted to store keys
directly below the root_path.
For keys not stored directly below root_path (ie: in a sub-path),
the name of the subpath (with the final slash stripped) is used as
the name of the keyfile group. To continue the example, if
"/apps/example/profiles/default/font-size" were set to
12 then the following would appear in the keyfile:
[profiles/default] font-size=12
The backend will refuse writes (and return writability as being
false) for keys outside of root_path and, in the event that
root_group is NULL, also for keys directly under root_path.
Writes will also be refused if the backend detects that it has the
inability to rewrite the keyfile (ie: the containing directory is not
writable).
There is no checking done for your key namespace clashing with the
syntax of the key file format. For example, if you have [ or ]
characters in your path names or = in your key names you may be in
trouble.
The backend reads default values from a keyfile called defaults in
the directory specified by the GKeyfileSettingsBackend:defaults-dir
property, and a list of locked keys from a text file with the name locks in
the same location.
Parameters
filename: string
the filename of the keyfile
root_path: string
the path under which all settings keys appear
Optionalroot_group: string
the group name corresponding to root_path, or NULL to disallow storing keys directly beneath root_path
Creates a keyfile-backed Gio.SettingsBackend.
The filename of the keyfile to use is given by
filename.All settings read to or written from the backend must fall under the path given in
root_path(which must start and end with a slash and not contain two consecutive slashes).root_pathmay be"/".If
root_groupis non-NULLthen it specifies the name of the keyfile group used for keys that are written directly belowroot_path. For example, ifroot_pathis"/apps/example/"androot_groupis"toplevel", then setting the key"/apps/example/enabled"to true will cause the following to appear in the keyfile:If
root_groupisNULLthen it is not permitted to store keys directly below theroot_path.For keys not stored directly below
root_path(ie: in a sub-path), the name of the subpath (with the final slash stripped) is used as the name of the keyfile group. To continue the example, if"/apps/example/profiles/default/font-size"were set to12then the following would appear in the keyfile:The backend will refuse writes (and return writability as being false) for keys outside of
root_pathand, in the event thatroot_groupisNULL, also for keys directly underroot_path. Writes will also be refused if the backend detects that it has the inability to rewrite the keyfile (ie: the containing directory is not writable).There is no checking done for your key namespace clashing with the syntax of the key file format. For example, if you have
[or]characters in your path names or=in your key names you may be in trouble.The backend reads default values from a keyfile called
defaultsin the directory specified by theGKeyfileSettingsBackend:defaults-dirproperty, and a list of locked keys from a text file with the namelocksin the same location.