Chamo.Bookmarks
Generic bookmark system.
val create_from_ocf_wrappers : ?doc:string -> 'a Ocf.wrapper -> 'a bookmarks
create_from_ocf_wappers wrappers
create a bookmarks structure. The given wrappers
are used to store the data of bookmarks in a formatted file.
val create : ?doc:string -> (string -> 'a) -> ('a -> string) -> 'a bookmarks
Same as create_from_ocf_wrappers
, the wrappers being built from the given data_of_string
and string_of_data
functions.
val get : 'a bookmarks -> string -> 'a
get bk name
retrieve the data associated to the given name.
val set : 'a bookmarks -> string -> 'a -> unit
set bk name data
creates or modify a bookmark by associating the given data
to the given name
.
val remove : 'a bookmarks -> string -> unit
remove bk name
removes the bookmarks with the given name
.
val list : 'a bookmarks -> (string * 'a) list
list bk
returns all the bookmarks as a list of (name, data)
.
val store : 'a bookmarks -> string -> unit
store bk file
stores the bookmarks bk
in the given file
.
val load : 'a bookmarks -> string -> unit
load bk file
loads fills the bookmarks structure bk
from the given file
. All previous bookmarks in the structure are removed.