Module Url.PathSource

Sourcetype kind = [
  1. | `Module
  2. | `Page
  3. | `LeafPage
  4. | `ModuleType
  5. | `Parameter of int
  6. | `Class
  7. | `ClassType
  8. | `File
  9. | `SourcePage
]
Sourceval pp_kind : Format.formatter -> kind -> unit
Sourceval string_of_kind : kind -> string
Sourceval pp_disambiguating_prefix : Format.formatter -> kind -> unit

Print the "kind-" prefix used to disambiguate urls in "flat modes": e.g. latex labels and output files in --flat HTML and man output

Sourcetype t = {
  1. kind : kind;
  2. parent : t option;
  3. name : string;
}
Sourceval from_identifier : [< any_pv ] Odoc_model.Paths.Identifier.id -> t
Sourceval to_list : t -> (kind * string) list
Sourceval of_list : (kind * string) list -> t option
Sourceval split : is_dir:(kind -> [ `Always | `Never | `IfNotLast ]) -> (kind * string) list -> (kind * string) list * (kind * string) list

split is_dir path splits the list path into a directory and filename, based on the is_dir function. The function is_dir should return whether or not the path element kind should be a directory or not. If the function is_dir returns `IfNotLast then the element will be a directory only if it is not the last element in the path. The return value is a tuple of directory-type elements and filename-type elements. If the is_dir function can return `Always, the caller must be prepared to handle the case where the filename part is empty.

Sourceval is_prefix : t -> t -> bool

is_prefix p1 p2 tells whether p1 is a prefix of p2. It considers index pages as their parent: dir/page-index is a prefix of dir/foo/module-bar.