@@ -211,7 +211,7 @@ external eio_openat : Unix.file_descr option -> bool -> string -> Flags.Open.t -
211211let openat ?dirfd ?(nofollow =false ) ~sw path flags dis create =
212212 with_dirfd " openat" dirfd @@ fun dirfd ->
213213 Switch. check sw;
214- in_worker_thread (fun () -> eio_openat dirfd nofollow path Flags.Open. (flags + cloexec (* + nonblock *) ) dis create)
214+ in_worker_thread ~label: " openat " (fun () -> eio_openat dirfd nofollow path Flags.Open. (flags + cloexec (* + nonblock *) ) dis create)
215215 |> Fd. of_unix ~sw ~blocking: false ~close_unix: true
216216
217217let mkdir ?dirfd ?(nofollow =false ) ~mode :_ path =
@@ -223,25 +223,33 @@ external eio_unlinkat : Unix.file_descr option -> string -> bool -> unit = "caml
223223
224224let unlink ?dirfd ~dir path =
225225 with_dirfd " unlink" dirfd @@ fun dirfd ->
226- in_worker_thread @@ fun () ->
226+ in_worker_thread ~label: " unlink " @@ fun () ->
227227 eio_unlinkat dirfd path dir
228228
229229external eio_renameat : Unix .file_descr option -> string -> Unix .file_descr option -> string -> unit = " caml_eio_windows_renameat"
230230
231231let rename ?old_dir old_path ?new_dir new_path =
232232 with_dirfd " rename-old" old_dir @@ fun old_dir ->
233233 with_dirfd " rename-new" new_dir @@ fun new_dir ->
234- in_worker_thread @@ fun () ->
234+ in_worker_thread ~label: " rename " @@ fun () ->
235235 eio_renameat old_dir old_path new_dir new_path
236236
237237
238238external eio_symlinkat : string -> Unix .file_descr option -> string -> unit = " caml_eio_windows_symlinkat"
239239
240240let symlink ~link_to new_dir new_path =
241241 with_dirfd " symlink-new" new_dir @@ fun new_dir ->
242- in_worker_thread @@ fun () ->
242+ in_worker_thread ~label: " symlink " @@ fun () ->
243243 eio_symlinkat link_to new_dir new_path
244244
245+ let chmod ~mode new_dir new_path =
246+ with_dirfd " chmod" new_dir @@ fun new_dir ->
247+ match new_dir with
248+ | Some _ -> failwith " chmod not supported on Windows"
249+ | None ->
250+ in_worker_thread ~label: " chmod" @@ fun () ->
251+ Unix. chmod new_path mode
252+
245253let lseek fd off cmd =
246254 Fd. use_exn " lseek" fd @@ fun fd ->
247255 let cmd =
0 commit comments