File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -164,6 +164,10 @@ end = struct
164164 with_parent_dir t path @@ fun dirfd path ->
165165 Err. run (Low_level. read_link ?dirfd) path
166166
167+ let chown ~follow ~uid ~gid t path =
168+ with_parent_dir t path @@ fun dirfd path ->
169+ Err. run (fun () -> Low_level. chown ?dirfd ~follow ~uid ~gid path) ()
170+
167171 let rename t old_path new_dir new_path =
168172 match Handler. as_posix_dir new_dir with
169173 | None -> invalid_arg " Target is not an eio_windows directory!"
Original file line number Diff line number Diff line change @@ -138,6 +138,10 @@ let read_link ?dirfd path =
138138 in_worker_thread @@ fun () ->
139139 Eio_unix.Private. read_link dirfd path
140140
141+ let chown ?dirfd ~follow :_ ~uid ~gid path =
142+ in_worker_thread @@ fun () ->
143+ Eio_unix.Private. chown ~flags: 0 ~uid ~gid dirfd path
144+
141145external eio_readv : Unix .file_descr -> Cstruct .t array -> int = " caml_eio_windows_readv"
142146
143147external eio_preadv : Unix .file_descr -> Cstruct .t array -> Optint.Int63 .t -> int = " caml_eio_windows_preadv"
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ val lstat : string -> Unix.LargeFile.stats
4343
4444val realpath : string -> string
4545val read_link : ?dirfd : fd -> string -> string
46+ val chown : ?dirfd : fd -> follow :bool -> uid :int64 -> gid :int64 -> string -> unit
4647
4748val mkdir : ?dirfd : fd -> ?nofollow : bool -> mode :int -> string -> unit
4849val unlink : ?dirfd : fd -> dir :bool -> string -> unit
You can’t perform that action at this time.
0 commit comments