package fileutils

  1. Overview
  2. Docs

Generic operations, with type filename and extension as strings.

include PATH_SPECIFICATION with type filename = string and type extension = string
type filename = string
type extension = string

Converting abstract type from/to string

val string_of_filename : filename -> string

Create a filename from a string.

val filename_of_string : string -> filename

Create a string from a filename.

val extension_of_string : string -> extension

Create an extension from a string.

val string_of_extension : extension -> string

Return string representation of an extension.

Standard operations

val make_filename : string list -> filename
val is_subdir : filename -> filename -> bool
val is_updir : filename -> filename -> bool
val compare : filename -> filename -> int
val basename : filename -> filename
val dirname : filename -> filename
val reduce : ?no_symlink:bool -> filename -> filename
val make_absolute : filename -> filename -> filename
val make_relative : filename -> filename -> filename
val identity : filename -> filename
val is_valid : filename -> bool
val is_relative : filename -> bool
val is_current : filename -> bool
val is_parent : filename -> bool
val chop_extension : filename -> filename
val get_extension : filename -> extension
val check_extension : filename -> extension -> bool
val add_extension : filename -> extension -> filename
val replace_extension : filename -> extension -> filename
val string_of_path : filename list -> string
val path_of_string : string -> filename list
val current_dir : filename
val parent_dir : filename
OCaml

Innovation. Community. Security.