File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 77====== Additions ======
88
99 * Lwt.reraise an exception raising function which preserves backtraces, recommended for use in Lwt.catch (#963)
10+ * Expose Lwt_io.delete_recursively for deleting a directory and its content recursively. (#984, Antonin Décimo)
1011
1112====== Build ======
1213
Original file line number Diff line number Diff line change @@ -543,10 +543,20 @@ val with_temp_dir :
543543 arguments to it. Once the temporary directory is created at [path],
544544 [with_temp_dir f] calls [f path]. When the promise returned by [f path] is
545545 resolved, [with_temp_dir f] recursively deletes the temporary directory and
546- all its contents.
546+ all its contents by calling {!Lwt_io.delete_recursively} .
547547
548548 @since 4.4.0 *)
549549
550+ val delete_recursively : string -> unit Lwt .t
551+ (* * [delete_recursively path] attempts to delete the directory [path]
552+ and all its content recursively.
553+
554+ This is likely VERY slow for directories with many files. That is probably
555+ best addressed by switching to blocking calls run inside a worker thread,
556+ i.e. with {!Lwt_preemptive}.
557+
558+ @since 5.7.0 *)
559+
550560val open_connection :
551561 ?fd : Lwt_unix .file_descr ->
552562 ?in_buffer : Lwt_bytes .t -> ?out_buffer : Lwt_bytes .t ->
You can’t perform that action at this time.
0 commit comments