Config
Object Hierarchy:
Description:
Represents a git configuration.
Namespace: Ggit
Package: libgit2-glib-1.0
Content:
Static methods:
- public static File find_global ()
Find the file representing the users global git configuration.
- public static File find_system ()
Find the file representing the systems global git configuration.
Creation methods:
- public Config ()
Create a new config.
- public Config.default () throws Error
Get the global, XDG and system configuration files merged into one Config with their appropriate priority levels.
- public Config.from_file (File file) throws Error
Create a new config from a single on disk file.
Methods:
- public bool @foreach (ConfigCallback callback) throws Error
Call
callback
for each configuration value. - public void add_file (File file, ConfigLevel level, bool force) throws Error
Add an on-disk config file instance to an existing config
- public bool delete_entry (string name) throws Error
Delete a config variable from the config file.
- public bool get_bool (string name) throws Error
Get a boolean configuration value.
- public ConfigEntry get_entry (string name) throws Error
Get ConfigEntry of a config variable.
- public int32 get_int32 (string name) throws Error
Get a int32 configuration value.
- public int64 get_int64 (string name) throws Error
Get a int64 configuration value.
- public unowned string? get_string (string name) throws Error
Get the configuration value of
name
as string. - public string? match (Regex regex, out MatchInfo match_info) throws Error
Matches a configuration against a regular expression.
- public bool match_foreach (Regex regex, ConfigMatchCallback callback) throws Error
Call
callback
for all configurations matchingregex
. - public Config open_level (ConfigLevel level) throws Error
Open a specific level config derived from a multi-level one.
- public bool set_bool (string name, bool value) throws Error
Set a boolean value.
- public bool set_int32 (string name, int32 value) throws Error
Set a int32 value.
- public bool set_int64 (string name, int64 value) throws Error
Set a int64 value.
- public bool set_string (string name, string value) throws Error
Set a new string value of a configuration.
- public Config snapshot () throws Error
Create a snapshot of the current state of the configuration, which allows you to look into a consistent view of the configuration for looking up complex values (e.
Inherited Members:
All known members inherited from class Ggit.Native
All known members inherited from class GLib.Object