let all_files dir = Sys.readdir dir |> Array.to_list |> List.filter_map ~f:(fun d -> let p = dir // d in if Sys.is_directory p then None else Some p)