module Fpath:sig
..end
Note. Only use "/"
as a directory separator, even on
Windows platforms.
typet =
Topkg.fpath
val append : t -> t -> t
append p q
appends q
to p
as follows:
q
is absolute then q
is returnedq
's segments to p
using a "/"
if needed.val (//) : t -> t -> t
p // q
is append p q
.val is_dir_path : t -> bool
is_dir_path p
is true
iff p
represents a directory. This means
that p
is .
, ..
or ends with /
, /..
or /.
.val is_file_path : t -> bool
is_file_path p
is not (is_dir_path true)
.val basename : t -> string
basename p
is p
's basename, the last non empty segment of p
.val dirname : t -> string
dirname p
is p
's dirname, p
without its last non empty segment.val get_ext : t -> string
get_ext p
is p
's filename extension (including the '.'
) or
the empty string if there is no extensionval has_ext : string -> t -> bool
has_ext e p
is true
iff e
is a suffix of p
.val rem_ext : t -> t
rem_ext p
is p
without its filename extension.