Skip to content

Commit

Permalink
Sexp
Browse files Browse the repository at this point in the history
  • Loading branch information
patricoferris committed Mar 22, 2024
1 parent 86e56ef commit 3d4e307
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/rsync_store.ml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ type mode =
| Copy
| Hardlink
| Hardlink_unsafe
[@@deriving sexp]

type t = {
path : string;
Expand Down
1 change: 1 addition & 0 deletions lib/rsync_store.mli
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion lib/store_spec.ml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
(** Configuration information to set up a store. *)

open Lwt.Infix
open Sexplib.Conv

type t = [
| `Btrfs of string (* Path *)
| `Zfs of string (* Path with pool at end *)
| `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)

Expand Down

0 comments on commit 3d4e307

Please sign in to comment.