5 let get_files_in_directory dir =
7 let dirh = opendir dir in
10 let x = readdir dirh in
13 _ -> closedir dirh; []
15 Sort.list ~order:(<) (get_them ())
16 with Unix_error _ -> []
18 let is_directory name =
20 (stat name).st_kind = S_DIR
23 let get_directories_in_files ~path =
24 List.filter ~pred:(fun x -> is_directory (path ^ "/" ^ x))
26 (************************************************** Subshell call *)
28 let rc = open_process_in ~cmd in
31 let x = input_line rc in x :: it ()