1Load_path(3)                     OCaml library                    Load_path(3)
2
3
4

NAME

6       Load_path - Management of include directories.
7

Module

9       Module   Load_path
10

Documentation

12       Module Load_path
13        : sig end
14
15
16       Management of include directories.
17
18       This module offers a high level interface to locating files in the load
19       path, which is constructed from -I command line flags and a  few  other
20       parameters.
21
22       It  makes  the  assumption  that  the  contents  of include directories
23       doesn't change during the execution of the compiler.
24
25
26
27
28
29
30       val add_dir : string -> unit
31
32       Add a directory to the end of the load path (i.e. at lowest priority.)
33
34
35
36       val remove_dir : string -> unit
37
38       Remove a directory from the load path
39
40
41
42       val reset : unit -> unit
43
44       Remove all directories
45
46
47
48       val init : string list -> unit
49
50
51       init l is the same as reset (); List.iter add_dir (List.rev l)
52
53
54
55
56       val get_paths : unit -> string list
57
58       Return the list of directories passed to add_dir so far.
59
60
61
62       val find : string -> string
63
64       Locate a file in the load path. Raise Not_found if the file  cannot  be
65       found.  This function is optimized for the case where the filename is a
66       basename, i.e. doesn't contain a directory separator.
67
68
69
70       val find_uncap : string -> string
71
72       Same as find , but search also for uncapitalized name, i.e.  if name is
73       Foo.ml, allow /path/Foo.ml and /path/foo.ml to match.
74
75
76       module Dir : sig end
77
78
79
80
81
82       val add : Dir.t -> unit
83
84       Old name for Load_path.append_dir
85
86
87
88
89       val append_dir : Dir.t -> unit
90
91
92       append_dir  d adds d to the end of the load path (i.e. at lowest prior‐
93       ity.
94
95
96
97       val prepend_dir : Dir.t -> unit
98
99
100       prepend_dir d adds d to the start of the load  path  (i.e.  at  highest
101       priority.
102
103
104
105       val get : unit -> Dir.t list
106
107       Same as get_paths () , except that it returns a Dir.t list .
108
109
110
111
112
113OCamldoc                          2022-07-22                      Load_path(3)
Impressum