package patoline

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Extension of the Filename module.

include module type of struct include Stdlib.Filename end
val current_dir_name : string
val parent_dir_name : string
val dir_sep : string
val is_relative : string -> bool
val is_implicit : string -> bool
val check_suffix : string -> string -> bool
val chop_suffix : string -> string -> string
val extension : string -> string
val remove_extension : string -> string
val chop_extension : string -> string
val basename : string -> string
val dirname : string -> string
val temp_file : ?temp_dir:string -> string -> string -> string
val open_temp_file : ?mode:Stdlib.open_flag list -> ?perms:int -> ?temp_dir:string -> string -> string -> string * Stdlib.out_channel
val get_temp_dir_name : unit -> string
val set_temp_dir_name : string -> unit
val temp_dir_name : string
  • deprecated Use Filename.get_temp_dir_name instead
val quote : string -> string
val concat : string -> string -> string

concat dir path is the same as the usual Filename.concat dir path, * except that it returns path when dir is equal to ".".

val find_file : string -> string list -> string

find_file name dirs returns the path to the first file named name, * that exists in the directories of the dirs list, in order. If no such * file is found, the exception Not_found is raised.

val decompose : string -> string * string * string

decompose path decomposes the file path path into (dir,base,ext) * where dir is the directory name, base the base name, and ext the * extension. If path does not contains a directory separator then dir * is given value ".". If path does not contain an extension, then the * ext is set to "".

val set_extension : string -> string -> string

set_extension path e returns a copy of path in which the extension * has been replaced by e. If path has no extension, the extension e * is appended to path.

val get_extension : string -> string

get_extension path returns the extension of the given file. If there * is no extension, the value "" is returned.

OCaml

Innovation. Community. Security.