Command-line and Emacs Calendar Client
1(** Functions for managing calendar directories with Collection.ts of .ics files 2*) 3 4type t 5(** A directory of Collection.ts, where each collection is a subdirectory 6 containing .ics files *) 7 8val create : 9 fs:[> Eio.Fs.dir_ty ] Eio.Path.t -> string -> (t, [> `Msg of string ]) result 10(** Create a calendar_dir from a directory path. Returns Ok with the 11 calendar_dir if successful, or Error with a message if the directory cannot 12 be created or accessed. *) 13 14val list_collections : 15 fs:[> Eio.Fs.dir_ty ] Eio.Path.t -> 16 t -> 17 (Collection.t list, [> `Msg of string ]) result 18(** List available Collection.ts in the calendar_dir. Returns Ok with the list 19 of Collection.t names if successful, or Error with a message if the 20 directory cannot be read. *) 21 22val get_collection : 23 fs:[> Eio.Fs.dir_ty ] Eio.Path.t -> 24 t -> 25 Collection.t -> 26 (Event.t list, [> `Msg of string | `Not_found ]) result 27(** Get all calendar files in a Collection.t. If the collection doesn't exist in 28 the cache, it will be loaded from disk. *) 29 30val get_collections : 31 fs:[> Eio.Fs.dir_ty ] Eio.Path.t -> 32 t -> 33 ((Collection.t * Event.t list) list, [> `Msg of string ]) result 34(** Get all Collection.ts with their calendar files. This will load any 35 Collection.ts that haven't been loaded yet. *) 36 37val add_event : 38 fs:[> Eio.Fs.dir_ty ] Eio.Path.t -> 39 t -> 40 Event.t -> 41 (unit, [> `Msg of string ]) result 42 43val edit_event : 44 fs:[> Eio.Fs.dir_ty ] Eio.Path.t -> 45 t -> 46 Event.t -> 47 (unit, [> `Msg of string ]) result 48 49val delete_event : 50 fs:[> Eio.Fs.dir_ty ] Eio.Path.t -> 51 t -> 52 Event.t -> 53 (unit, [> `Msg of string ]) result 54 55val get_path : t -> string