Skip to content

Commit

Permalink
Fix eio_windows types
Browse files Browse the repository at this point in the history
  • Loading branch information
patricoferris committed Apr 1, 2024
1 parent 7ec85fe commit a3c0ea6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib_eio_windows/dune
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
(name eio_windows)
(public_name eio_windows)
(library_flags :standard -cclib -lbcrypt -cclib -lntdll)
(enabled_if (= %{os_type} "Win32"))
; (enabled_if (= %{os_type} "Win32"))
(foreign_stubs
(language c)
(include_dirs ../lib_eio/unix/include)
Expand Down
6 changes: 3 additions & 3 deletions lib_eio_windows/fs.ml
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@ end = struct
with_parent_dir new_dir new_path @@ fun new_dir new_path ->
Err.run (Low_level.rename ?old_dir old_path ?new_dir) new_path

let symlink t old_path new_path =
with_parent_dir t new_path @@ fun dirfd path ->
Err.run (Low_level.symlink old_path dirfd) path
let symlink t path ~link_to =
with_parent_dir t path @@ fun dirfd path ->
Err.run (Low_level.symlink link_to dirfd) path

let close t = t.closed <- true

Expand Down
2 changes: 2 additions & 0 deletions lib_eio_windows/low_level.mli
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ val read_link : ?dirfd:fd -> string -> string
val mkdir : ?dirfd:fd -> ?nofollow:bool -> mode:int -> string -> unit
val unlink : ?dirfd:fd -> dir:bool -> string -> unit
val rename : ?old_dir:fd -> string -> ?new_dir:fd -> string -> unit

val symlink : string -> fd option -> string -> unit
(** [symlink link_to dir path] creates a new symbolic link [dir / path] pointing to [link_to] *)

val readdir : string -> string array

Expand Down

0 comments on commit a3c0ea6

Please sign in to comment.