Debian Codegraph @

tools/coqdep/lib/file_util.mli

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 (************************************************************************)
2 (* * The Rocq Prover / The Rocq Development Team *)
3 (* v * Copyright INRIA, CNRS and contributors *)
4 (* <O___,, * (see version control and CREDITS file for authors & dates) *)
5 (* \VV/ **************************************************************)
6 (* // * This file is distributed under the terms of the *)
7 (* * GNU Lesser General Public License Version 2.1 *)
8 (* * (see LICENSE file for the text of the license) *)
9 (************************************************************************)
10
11 (** [to_relative_path path] takes as input a file path [path], and constructs
12 an equivalent relative path from the current working directory. If [path]
13 is already relative, then it is returned immediately. *)
14 val to_relative_path : string -> string
15
16 (** [normalize_path path] takes as input a file path [path], and returns an
17 equivalent path that: (1) does not contain the current directory member
18 ["."] unless the path is to the current directory (in which case ["."]
19 is returned, or ["./"] if [path] has a trailing ["/"]), (2) only uses
20 parent directory members [".."] for a prefix of the path, and (3), has
21 a trailing ["/"] only if and only if [path] does.
22
23 For example, paths ["dir1/dir2/file.v"], ["."], ["dir1/dir2/dir3/"] and
24 ["../../dir/file.v"] are possible return values, but ["./file.v"] and
25 ["dir1/../dir2"] are not. *)
26 val normalize_path : string -> string