Started work on patching store/file

This commit is contained in:
Stavros Polymenis 2017-11-15 20:02:50 +00:00
parent aacc0daa99
commit 257038afe8

View File

@ -5,7 +5,7 @@ let load f =
let s = Bytes.create n in
really_input ic s 0 n;
close_in ic;
(s)
Bytes.to_string s
let note path = Lpath.fpath_of_note path |> load |> Note.of_string
@ -22,7 +22,7 @@ let to_list ?(order) lens_fn store =
Lpath.string_of_repo repo_path
|> Sys.readdir
|> Array.to_list
|> List.filter (fun file -> BatString.ends_with file Lpath.extension)
|> List.filter (fun filename -> BatString.ends_with file Lpath.extension) (* convert to paths first then check extention *)
|> List.fold_left cons_valid_meta []
|> match order with
| Some fn -> List.fast_sort fn