package uwt

  1. Overview
  2. Docs
type uv_open_flag = Fs_types.uv_open_flag =
  1. | O_RDONLY
  2. | O_WRONLY
  3. | O_RDWR
  4. | O_NONBLOCK
  5. | O_CREAT
  6. | O_EXCL
  7. | O_TRUNC
  8. | O_APPEND
  9. | O_NOCTTY
  10. | O_DSYNC
  11. | O_SYNC
  12. | O_RSYNC
  13. | O_TEMPORARY
  14. | O_SHORT_LIVED
  15. | O_SEQUENTIAL
  16. | O_RANDOM
  17. | O_DIRECT
  18. | O_EXLOCK
  19. | O_NOATIME
  20. | O_NOFOLLOW
  21. | O_DIRECTORY
type file_kind = Fs_types.file_kind =
  1. | S_REG
  2. | S_DIR
  3. | S_CHR
  4. | S_BLK
  5. | S_LNK
  6. | S_FIFO
  7. | S_SOCK
  8. | S_UNKNOWN
type access_permission = Fs_types.access_permission =
  1. | Read
  2. | Write
  3. | Exec
  4. | Exists
type stats = Fs_types.stats = {
  1. st_dev : int;
  2. st_kind : file_kind;
  3. st_perm : int;
  4. st_uid : int;
  5. st_gid : int;
  6. st_rdev : int;
  7. st_ino : int;
  8. st_size : int64;
  9. st_blksize : int;
  10. st_blocks : int;
  11. st_flags : int;
  12. st_gen : int;
  13. st_atime : int64;
  14. st_atime_nsec : int;
  15. st_mtime : int64;
  16. st_mtime_nsec : int;
  17. st_ctime : int64;
  18. st_ctime_nsec : int;
  19. st_birthtime : int64;
  20. st_birthtime_nsec : int;
}
type clone_mode =
  1. | No_clone
  2. | Try_clone
  3. | Force_clone
type 'a t
val openfile : ?perm:int -> mode:uv_open_flag list -> string -> file t
val read : ?pos:int -> ?len:int -> file -> buf:bytes -> int t
val read_ba : ?pos:int -> ?len:int -> file -> buf:buf -> int t
val pread : ?pos:int -> ?len:int -> file -> fd_offset:int64 -> buf:bytes -> int t
val pread_ba : ?pos:int -> ?len:int -> file -> fd_offset:int64 -> buf:buf -> int t
val write : ?pos:int -> ?len:int -> file -> buf:bytes -> int t
val write_string : ?pos:int -> ?len:int -> file -> buf:string -> int t
val write_ba : ?pos:int -> ?len:int -> file -> buf:buf -> int t
val pwrite : ?pos:int -> ?len:int -> file -> fd_offset:int64 -> buf:bytes -> int t
val pwrite_string : ?pos:int -> ?len:int -> file -> fd_offset:int64 -> buf:string -> int t
val pwrite_ba : ?pos:int -> ?len:int -> file -> fd_offset:int64 -> buf:buf -> int t
val writev : file -> Iovec_write.t list -> int t
val pwritev : file -> Iovec_write.t list -> int64 -> int t
val close : file -> unit t
val mkdir : ?perm:int -> string -> unit t
val rmdir : string -> unit t
val fsync : file -> unit t
val fdatasync : file -> unit t
val ftruncate : file -> len:int64 -> unit t
val stat : string -> stats t
val lstat : string -> stats t
val fstat : file -> stats t
val rename : src:string -> dst:string -> unit t
val mkdtemp : string -> string t
val sendfile : ?pos:int64 -> ?len:nativeint -> dst:file -> src:file -> unit -> nativeint t
val utime : string -> access:float -> modif:float -> unit t
val futime : file -> access:float -> modif:float -> unit t
val access : string -> access_permission list -> unit t
val chmod : string -> perm:int -> unit t
val fchmod : file -> perm:int -> unit t
val chown : string -> uid:int -> gid:int -> unit t
val fchown : file -> uid:int -> gid:int -> unit t
val lchown : string -> uid:int -> gid:int -> unit t
val scandir : string -> (file_kind * string) array t
val realpath : string -> string t
val copyfile : ?excl:bool -> ?clone:clone_mode -> src:string -> dst:string -> unit -> unit t