These functions parse ini file and make them available in easily accessible manner.
val read : ?unicode:bool ‑> string ‑> sections
read fname
reads INI data from the file fname
.
false
, beware that unicode handling is somewhat buggy in
libGammu).val of_gammurc : ?path:string ‑> unit ‑> sections
Finds and reads gammu configuration file. The search order depends on platform. On POSIX systems it looks for ~/.gammurc and then for /etc/gammurc and also follows freedesktop.org/XDG specifications and reads ~/.config/gammu/config (in versions > 1.28.92 of libGammu), on Windows for gammurc in Application data folder, then in home and last fallback is in current directory.
Parameter path: force the use of a custom path instead of the autodetected one (default: autodetection is performed).
Raises Error CANTOPENFILE
if no gammu rc file can be found.
Raises Error FILENOTSUPPORTED
if first found gammu rc file is
not valid.
read_config section num
processes and returns gammu configuration
represented by the num
th section of the INI file representation
section
. Beware that num
th section is in facts the section named
"gammunum
" in the file itself.
val get_value : sections ‑> section:string ‑> key:string ‑> string