aboutsummaryrefslogblamecommitdiffstats
path: root/lib/kernel/Path.ml
blob: 803d8cfefd78648db9bb8002f89be4ffd3eb6cfd (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                    
 

                   
 




                                 

                                               


                                           
                         
                                     
type t = string list

let this = []
let (@/) x y = x::y

let rec lookup handle = function
  | [] -> Ok (Some handle)
  | x::xs ->
     let open Utilities.Result in
     let open Protocols in
     match Protocols.Directory.from handle with
     | None -> Ok None
     | Some dir ->
        let* elem = Directory.find dir x in
        match elem with
        | None -> Ok None
        | Some elem -> lookup elem xs