-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.mli
More file actions
40 lines (24 loc) · 910 Bytes
/
Copy pathconfig.mli
File metadata and controls
40 lines (24 loc) · 910 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
open State
open Unix
module OUnix = Unix
open Async
open Async_extra.Import.Reader
open Async_extra.Import.Writer
exception NoSuchFile of string
val dir_CONFIG : string
(* Checks that file or directory denoted by path is valid. Returns path if ok. *)
val path_ok : string -> string
val config_ok : string -> string
val write_file : string -> string -> string -> unit Deferred.t
val fname_PUBKEY : string
val fname_PRIVKEY : string
val fname_PEERS : string
val fname_STORED_STATE : string
(* <==== Declare load files here ====> *)
val load_pubkey : string -> string Deferred.t
val load_privkey : string -> string Deferred.t
val load_peerkey : string -> string Deferred.t
val load_state : string -> State.state_info Deferred.t
(* <==== Write functions ====> *)
val save_state : State.state_info -> string -> unit Async.Deferred.t
val save_st_string : string -> string -> unit Async.Deferred.t