Module Url.Path

type kind = [
| `Module
| `Page
| `LeafPage
| `ModuleType
| `Argument
| `Class
| `ClassType
| `File
]
val pp_kind : Stdlib.Format.formatter -> kind -> unit
val string_of_kind : kind -> string
type t = {
kind : kind;
parent : t option;
name : string;
}
val from_identifier : [< source ] -> t
val to_list : t -> (kind * string) list
val of_list : (kind * string) list -> t option
val 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.