10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-11-19 20:42:22 +01:00
QCaml/common/lib/qcaml.ml

18 lines
294 B
OCaml
Raw Normal View History

2020-09-26 12:02:53 +02:00
let name = "QCaml"
let root =
let rec chop = function
| [] -> raise Not_found
| x :: _ as l when x = name -> l
| _ :: rest -> chop rest
in
String.split_on_char Filename.dir_sep.[0] (Sys.getcwd ())
|> List.rev
|> chop
|> List.rev
|> String.concat Filename.dir_sep