diff --git a/lib/rsync_store.ml b/lib/rsync_store.ml index dfc15b6f..6d94ea30 100644 --- a/lib/rsync_store.ml +++ b/lib/rsync_store.ml @@ -14,6 +14,7 @@ type mode = | Copy | Hardlink | Hardlink_unsafe +[@@deriving sexp] type t = { path : string; diff --git a/lib/rsync_store.mli b/lib/rsync_store.mli index ee0d69d0..ce92da42 100644 --- a/lib/rsync_store.mli +++ b/lib/rsync_store.mli @@ -8,6 +8,7 @@ type mode = | Hardlink_unsafe (** Reasonably fast and uses less disk space, but no checksum verification. Only for testing during development, do not use in production. *) +[@@deriving sexp] val create : path:string -> ?mode:mode -> unit -> t Lwt.t (** [create ~path ?mode ()] creates a new rsync store where everything will diff --git a/lib/store_spec.ml b/lib/store_spec.ml index adb8366f..5aadfd79 100644 --- a/lib/store_spec.ml +++ b/lib/store_spec.ml @@ -1,6 +1,7 @@ (** Configuration information to set up a store. *) open Lwt.Infix +open Sexplib.Conv type t = [ | `Btrfs of string (* Path *) @@ -8,7 +9,7 @@ type t = [ | `Rsync of (string * Rsync_store.mode) (* Path for the root of the store *) | `Xfs of string (* Path *) | `Docker of string (* Path *) -] +][@@deriving sexp] let is_absolute path = not (Filename.is_relative path)