- Timestamp:
- Jun 20, 2022, 11:08:12 PM (3 years ago)
- Location:
- trunk/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/file_store.ml
r6 r11 95 95 List.fold_left (fold_valid_text predicate) new_iteration flist 96 96 97 let with_id ?(r=false) ?(dir=def_dir ()) id =98 let matched acc path =99 match to_text path with100 | Error x -> prerr_endline x; acc101 | Ok text when text.Text.id <> id -> acc102 | Ok text ->103 match acc with104 | Ok None -> Ok (Some text)105 | Ok (Some prev) -> if prev = text then acc else Error [text; prev]106 | Error x -> Error (text :: x)107 in List.fold_left matched (Ok None) (list_fs ~r dir)108 109 97 let with_dir ?(descr="") ?(perm=0o740) dir = 110 98 let mkdir dir = match Unix.mkdir dir perm with -
trunk/lib/store.ml
r3 r11 9 9 val newest: record_t -> record_t -> int 10 10 val oldest: record_t -> record_t -> int 11 val with_id: archive_t -> Id.t -> (Text.t option, Text.t list) result12 11 val with_text: archive_t -> Text.t -> (string * Text.t, string) result 13 12 val iter: ?predicate:(Text.t -> bool) -> ?order:(record_t -> record_t -> int) -> ?number:int
Note:
See TracChangeset
for help on using the changeset viewer.