class rawConfigParser :Primary interface class for configuarion files.object..end
Usage example:
let cp = new rawConfigParser in
cp#readfile "app.conf";
print_endline cp#get "sect1" "opt1";
let calc = (cp#getint "sect1" "intopt1") + (cp#getint "sect1" "intopt2")
method maingetdata : string -> string -> stringmethod sections : string listDEFAULT.method add_section : string -> unitConfigParser.DuplicateSectionError
if the section already exists. cp#add_section "foo" will add the
section named "foo" to the object cp.method has_section : string -> boolcp#has_section "foo" will
return true if that section is present.method options : string -> string listmethod has_option : string -> string -> boolcp#has_option "sectname" "optname".method readfile : string -> unitmethod readchan : Pervasives.in_channel -> unitmethod readstring : string -> unitmethod get : ?default:string -> string -> string -> stringcp#get "sectname" "optname". If optname cannot be found in the
given section sectname, searches for that option name in the section
DEFAULT. If it is still not found there and the optional
default argument is given, return that; otherwise, raises Not_found.
The other get* functions share this behavior.method getint : ?default:int -> string -> string -> intmethod getfloat : ?default:float -> string -> string -> floatmethod getbool : ?default:bool -> string -> string -> boolmethod items : string -> (string * string) listmethod set : string -> string -> string -> unitcp#set "sectname" "optname" "newvalue"method to_string : stringmethod writefile : string -> unitmethod writechan : Pervasives.out_channel -> unitmethod remove_option : string -> string -> boolcp#remove_option "sectname" "optname"method remove_section : string -> boolDEFAULT section. Returns true if something was removed; false
otherwise.method optionxform : string -> stringmethod optionxform oname = String.lowercase oname.