## 5.5 Loadpath

There are currently two loadpaths in Coq. A loadpath where seeking Coq files (extensions `.v` or `.vo` or `.vi`) and one where seeking Objective Caml files. The default loadpath contains the directory ```.`'' denoting the current directory and mapped to the empty logical path (see section 2.6).

### 5.5.1 `Pwd.`

This command displays the current working directory.

### 5.5.2 `Cd` string`.`

This command changes the current directory according to string which can be any valid path.
Variants:

1. `Cd.`
   Is equivalent to `Pwd.`

### 5.5.3 `Add LoadPath` string`as` dirpath`.`

This command adds the path string to the current Coq loadpath and maps it to the logical directory dirpath, which means that every file `M.v` physically lying in directory string becomes accessible through logical name ``dirpath`.M`''.
Remark: `Add LoadPath` also adds string to the current ML loadpath.
Variants:

1. `Add LoadPath` string`.`
   Performs as `Add LoadPath` string`as` dirpath but for the empty directory path.

### 5.5.4 `Add Rec LoadPath` string`as` dirpath`.`

This command adds the directory string and all its subdirectories to the current Coq loadpath. The top directory string is mapped to the logical directory dirpath while any subdirectory pdir is mapped to logical directory dirpath`.pdir` and so on.
Remark: `Add Rec LoadPath` also recursively adds string to the current ML loadpath.
Variants:

1. `Add Rec LoadPath` string`.`
   Works as `Add Rec LoadPath` string`as` dirpath but for the empty logical directory path.

### 5.5.5 `Remove LoadPath` string`.`

This command removes the path string from the current Coq loadpath.

### 5.5.6 `Print LoadPath.`

This command displays the current Coq loadpath.

### 5.5.7 `Add ML Path` string`.`

This command adds the path string to the current Objective Caml loadpath (see the command `Declare ML Module` in the section 5.4).
Remark: This command is implied by `Add LoadPath` string`as` dirpath.

### 5.5.8 `Add Rec ML Path` string`.`

This command adds the directory string and all its subdirectories to the current Objective Caml loadpath (see the command `Declare ML Module` in the section 5.4).
Remark: This command is implied by `Add Rec LoadPath` string`as` dirpath.

### 5.5.9 `Print ML Path` string`.`

This command displays the current Objective Caml loadpath. This command makes sense only under the bytecode version of `coqtop`, i.e. using option `-byte` (see the command `Declare ML Module` in the section 5.4).

### 5.5.10 `Locate File` string`.`

This command displays the location of file string in the current loadpath. Typically, string is a `.cmo` or `.vo` or `.v` file.

### 5.5.11 `Locate Library` dirpath`.`

This command gives the status of the Coq module dirpath. It tells if the module is loaded and if not searches in the load path for a module of logical name dirpath.