Something went wrong. Try again.
Odoc docs forked from jon.recoil.org/odd
Something went wrong. Try again.
12345678910111213141516171819let marker_name = ".odd-stale"let marker sw name = Fpath.(Switch.odoc_dir sw / name / marker_name)
let read sw = match Bos.OS.Dir.contents (Switch.odoc_dir sw) with | Error _ -> [] | Ok entries -> List.filter_map (fun d -> match Bos.OS.File.exists Fpath.(d / marker_name) with | Ok true -> Some (Fpath.basename d) | _ -> None) entries |> List.sort compare
let mark sw name = Result.bind (Bos.OS.Dir.create ~path:true Fpath.(Switch.odoc_dir sw / name)) @@ fun (_ : bool) -> Bos.OS.File.write (marker sw name) ""