File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -261,6 +261,9 @@ let exists filename =
261261let opt_file filename =
262262 if exists filename then Some filename else None
263263
264+ let mk_tmp_file () =
265+ of_string @@ OpamSystem. mk_temp_dir ()
266+
264267let with_tmp_file fn =
265268 OpamSystem. with_tmp_file (fun file -> fn (of_string file))
266269
Original file line number Diff line number Diff line change @@ -177,6 +177,10 @@ val exists: t -> bool
177177 a symlink to one *)
178178val opt_file : t -> t option
179179
180+ (* * Returns an unique filename in temporary directory.
181+ If it exists, cleaned at exit *)
182+ val mk_tmp_file : unit -> t
183+
180184(* * Execute a function with a file in a temp directory.
181185 It is always cleaned up afterwards. *)
182186val with_tmp_file : (t -> 'a ) -> 'a
You can’t perform that action at this time.
0 commit comments