.TH "Load_path" 3o 2023-09-18 OCamldoc "OCaml library" .SH NAME Load_path \- Management of include directories. .SH Module Module Load_path .SH Documentation .sp Module .BI "Load_path" : .B sig end .sp Management of include directories\&. .sp This module offers a high level interface to locating files in the load path, which is constructed from .ft B \-I .ft R command line flags and a few other parameters\&. .sp It makes the assumption that the contents of include directories doesn\&'t change during the execution of the compiler\&. .sp .sp .sp .I val add_dir : .B string -> unit .sp Add a directory to the end of the load path (i\&.e\&. at lowest priority\&.) .sp .I val remove_dir : .B string -> unit .sp Remove a directory from the load path .sp .I val reset : .B unit -> unit .sp Remove all directories .sp .I val init : .B string list -> unit .sp .ft B init l .ft R is the same as .ft B reset (); List\&.iter add_dir (List\&.rev l) .ft R .sp .I val get_paths : .B unit -> string list .sp Return the list of directories passed to .ft B add_dir .ft R so far\&. .sp .I val find : .B string -> string .sp Locate a file in the load path\&. Raise .ft B Not_found .ft R if the file cannot be found\&. This function is optimized for the case where the filename is a basename, i\&.e\&. doesn\&'t contain a directory separator\&. .sp .I val find_uncap : .B string -> string .sp Same as .ft B find .ft R , but search also for uncapitalized name, i\&.e\&. if name is Foo\&.ml, allow /path/Foo\&.ml and /path/foo\&.ml to match\&. .sp .I module Dir : .B sig end .sp .sp .I val add : .B Dir.t -> unit .sp Old name for .ft B Load_path\&.append_dir .ft R .sp .I val append_dir : .B Dir.t -> unit .sp .ft B append_dir d .ft R adds .ft B d .ft R to the end of the load path (i\&.e\&. at lowest priority\&. .sp .I val prepend_dir : .B Dir.t -> unit .sp .ft B prepend_dir d .ft R adds .ft B d .ft R to the start of the load path (i\&.e\&. at highest priority\&. .sp .I val get : .B unit -> Dir.t list .sp Same as .ft B get_paths () .ft R , except that it returns a .ft B Dir\&.t list .ft R \&. .sp