File system paths
type t = fpathThe type for file system paths.
append p q appends q to p as follows:
- If
qis absolute thenqis returned - Otherwise appends
q's segments topusing a"/"if needed.
val is_dir_path : t -> boolis_dir_path p is true iff p represents a directory. This means that p is ., .. or ends with /, /.. or /..
val is_file_path : t -> boolis_file_path p is not (is_dir_path true).
val basename : t -> stringbasename p is p's basename, the last non empty segment of p.
val dirname : t -> stringdirname p is p's dirname, p without its last non empty segment.
File extensions
val get_ext : t -> stringget_ext p is p's filename extension (including the '.') or the empty string if there is no extension
val has_ext : string -> t -> boolhas_ext e p is true iff e is a suffix of p.