5.4. System dependent path handling

Start ocaml section to src/flx_filesys.mli[1 /1 ]
     1: # 3 "./lpsrc/flx_filesys.ipk"
     2: val filetime : string -> float
     3: val find_file_in_path:
     4:   string list -> string -> string
     5: val find_file:
     6:   bool -> string list -> string -> string
     7: 
End ocaml section to src/flx_filesys.mli[1]
Start ocaml section to src/flx_filesys.ml[1 /1 ]
     1: # 10 "./lpsrc/flx_filesys.ipk"
     2: exception Found_file of string
     3: 
     4: let find_file_in_path incdirs f =
     5:   try
     6:     List.iter
     7:     (fun d ->
     8:       let f = Filename.concat d f in
     9:       if Sys.file_exists f
    10:       then raise (Found_file f)
    11:     )
    12:     incdirs
    13:     ;
    14:     ""
    15:   with Found_file s -> s
    16: 
    17: let find_file lookup incdirs f =
    18:   if String.length f = 0
    19:   then failwith "Empty include file name"
    20:   ;
    21:   if f.[0] = '/' || not lookup then f
    22:   else find_file_in_path incdirs f
    23: 
    24: let filetime f =
    25:   if f = "" then 0.0
    26:   else
    27:     try (Unix.stat f).Unix.st_mtime
    28:     with | _ -> 0.0
    29: 
    30: 
End ocaml section to src/flx_filesys.ml[1]