summaryrefslogtreecommitdiff
path: root/stdlib/filename.mli
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2010-01-20 16:26:46 +0000
committerDamien Doligez <damien.doligez-inria.fr>2010-01-20 16:26:46 +0000
commitbdc0fadee2dc9669818955486b4c3497016edda5 (patch)
tree48047d836d903e84f7e0ae6d74613c2247c4fc81 /stdlib/filename.mli
parent8cd4fc63907a541d05f31a740632948d453f69f9 (diff)
downloadocaml-bdc0fadee2dc9669818955486b4c3497016edda5.tar.gz
merge changes from release/3.11.1 to release/3.11.2
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9540 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'stdlib/filename.mli')
-rw-r--r--stdlib/filename.mli9
1 files changed, 7 insertions, 2 deletions
diff --git a/stdlib/filename.mli b/stdlib/filename.mli
index 3a968e0a1f..e016609527 100644
--- a/stdlib/filename.mli
+++ b/stdlib/filename.mli
@@ -22,6 +22,9 @@ val parent_dir_name : string
(** The conventional name for the parent of the current directory
(e.g. [..] in Unix). *)
+val dir_sep : string
+(** The directory separator (e.g. [/] in Unix). *)
+
val concat : string -> string -> string
(** [concat dir file] returns a file name that designates file
[file] in directory [dir]. *)
@@ -68,11 +71,13 @@ val basename : string -> string
val dirname : string -> string
(** See {!Filename.basename}. *)
-val temp_file : string -> string -> string
+val temp_file : ?temp_dir: string -> string -> string -> string
(** [temp_file prefix suffix] returns the name of a
fresh temporary file in the temporary directory.
The base name of the temporary file is formed by concatenating
[prefix], then a suitably chosen integer number, then [suffix].
+ The optional argument [temp_dir] indicates the temporary directory
+ to use, defaulting to {!Filename.temp_dir_name}.
The temporary file is created empty, with permissions [0o600]
(readable and writable only by the file owner). The file is
guaranteed to be different from any other file that existed when
@@ -80,7 +85,7 @@ val temp_file : string -> string -> string
*)
val open_temp_file :
- ?mode: open_flag list -> string -> string -> string * out_channel
+ ?mode: open_flag list -> ?temp_dir: string -> string -> string -> string * out_channel
(** Same as {!Filename.temp_file}, but returns both the name of a fresh
temporary file, and an output channel opened (atomically) on
this file. This function is more secure than [temp_file]: there