sig
type error =
E2BIG
| EACCES
| EADDRINUSE
| EADDRNOTAVAIL
| EAFNOSUPPORT
| EAGAIN
| EAI_ADDRFAMILY
| EAI_AGAIN
| EAI_BADFLAGS
| EAI_BADHINTS
| EAI_CANCELED
| EAI_FAIL
| EAI_FAMILY
| EAI_MEMORY
| EAI_NODATA
| EAI_NONAME
| EAI_OVERFLOW
| EAI_PROTOCOL
| EAI_SERVICE
| EAI_SOCKTYPE
| EALREADY
| EBADF
| EBUSY
| ECANCELED
| ECHARSET
| ECONNABORTED
| ECONNREFUSED
| ECONNRESET
| EDESTADDRREQ
| EEXIST
| EFAULT
| EFBIG
| EHOSTUNREACH
| EINTR
| EINVAL
| EIO
| EISCONN
| EISDIR
| ELOOP
| EMFILE
| EMSGSIZE
| ENAMETOOLONG
| ENETDOWN
| ENETUNREACH
| ENFILE
| ENOBUFS
| ENODEV
| ENOENT
| ENOMEM
| ENONET
| ENOPROTOOPT
| ENOSPC
| ENOSYS
| ENOTCONN
| ENOTDIR
| ENOTEMPTY
| ENOTSOCK
| ENOTSUP
| EPERM
| EPIPE
| EPROTO
| EPROTONOSUPPORT
| EPROTOTYPE
| ERANGE
| EROFS
| ESHUTDOWN
| ESPIPE
| ESRCH
| ETIMEDOUT
| ETXTBSY
| EXDEV
| UNKNOWN
| EOF
| ENXIO
| EMLINK
| UWT_EFATAL
val strerror : Uwt_base.error -> string
val err_name : Uwt_base.error -> string
val to_unix_error : Uwt_base.error -> Unix.error
val of_unix_error : Unix.error -> Uwt_base.error
type 'a uv_result = ('a, Uwt_base.error) Pervasives.result
type ('a, 'b) o_result =
('a, 'b) Pervasives.result =
Ok of 'a
| Error of 'b
type 'a result = ('a, Uwt_base.error) Uwt_base.o_result
module Int_result :
sig
type 'a t = private int
type real_int = int
type real_unit = unit
type int = Uwt_base.Int_result.real_int Uwt_base.Int_result.t
type unit = Uwt_base.Int_result.real_unit Uwt_base.Int_result.t
val is_ok : 'a Uwt_base.Int_result.t -> bool
val is_error : 'a Uwt_base.Int_result.t -> bool
val to_int : Uwt_base.Int_result.int -> Uwt_base.Int_result.real_int
val to_error : 'a Uwt_base.Int_result.t -> Uwt_base.error
val plain : 'a Uwt_base.Int_result.t -> Uwt_base.Int_result.real_int
val to_exn :
?name:string -> ?param:string -> 'a Uwt_base.Int_result.t -> exn
val raise_exn :
?name:string -> ?param:string -> 'a Uwt_base.Int_result.t -> 'b
val eagain : Uwt_base.Int_result.int
val e2big : Uwt_base.Int_result.int
val eacces : Uwt_base.Int_result.int
val eaddrinuse : Uwt_base.Int_result.int
val eaddrnotavail : Uwt_base.Int_result.int
val eafnosupport : Uwt_base.Int_result.int
val eai_addrfamily : Uwt_base.Int_result.int
val eai_again : Uwt_base.Int_result.int
val eai_badflags : Uwt_base.Int_result.int
val eai_badhints : Uwt_base.Int_result.int
val eai_canceled : Uwt_base.Int_result.int
val eai_fail : Uwt_base.Int_result.int
val eai_family : Uwt_base.Int_result.int
val eai_memory : Uwt_base.Int_result.int
val eai_nodata : Uwt_base.Int_result.int
val eai_noname : Uwt_base.Int_result.int
val eai_overflow : Uwt_base.Int_result.int
val eai_protocol : Uwt_base.Int_result.int
val eai_service : Uwt_base.Int_result.int
val eai_socktype : Uwt_base.Int_result.int
val ealready : Uwt_base.Int_result.int
val ebadf : Uwt_base.Int_result.int
val ebusy : Uwt_base.Int_result.int
val ecanceled : Uwt_base.Int_result.int
val echarset : Uwt_base.Int_result.int
val econnaborted : Uwt_base.Int_result.int
val econnrefused : Uwt_base.Int_result.int
val econnreset : Uwt_base.Int_result.int
val edestaddrreq : Uwt_base.Int_result.int
val eexist : Uwt_base.Int_result.int
val efault : Uwt_base.Int_result.int
val efbig : Uwt_base.Int_result.int
val ehostunreach : Uwt_base.Int_result.int
val eintr : Uwt_base.Int_result.int
val einval : Uwt_base.Int_result.int
val eio : Uwt_base.Int_result.int
val eisconn : Uwt_base.Int_result.int
val eisdir : Uwt_base.Int_result.int
val eloop : Uwt_base.Int_result.int
val emfile : Uwt_base.Int_result.int
val emsgsize : Uwt_base.Int_result.int
val enametoolong : Uwt_base.Int_result.int
val enetdown : Uwt_base.Int_result.int
val enetunreach : Uwt_base.Int_result.int
val enfile : Uwt_base.Int_result.int
val enobufs : Uwt_base.Int_result.int
val enodev : Uwt_base.Int_result.int
val enoent : Uwt_base.Int_result.int
val enomem : Uwt_base.Int_result.int
val enonet : Uwt_base.Int_result.int
val enoprotoopt : Uwt_base.Int_result.int
val enospc : Uwt_base.Int_result.int
val enosys : Uwt_base.Int_result.int
val enotconn : Uwt_base.Int_result.int
val enotdir : Uwt_base.Int_result.int
val enotempty : Uwt_base.Int_result.int
val enotsock : Uwt_base.Int_result.int
val enotsup : Uwt_base.Int_result.int
val eperm : Uwt_base.Int_result.int
val epipe : Uwt_base.Int_result.int
val eproto : Uwt_base.Int_result.int
val eprotonosupport : Uwt_base.Int_result.int
val eprototype : Uwt_base.Int_result.int
val erange : Uwt_base.Int_result.int
val erofs : Uwt_base.Int_result.int
val eshutdown : Uwt_base.Int_result.int
val espipe : Uwt_base.Int_result.int
val esrch : Uwt_base.Int_result.int
val etimedout : Uwt_base.Int_result.int
val etxtbsy : Uwt_base.Int_result.int
val exdev : Uwt_base.Int_result.int
val unknown : Uwt_base.Int_result.int
val eof : Uwt_base.Int_result.int
val enxio : Uwt_base.Int_result.int
val emlink : Uwt_base.Int_result.int
val uwt_efatal : Uwt_base.Int_result.int
end
type file
type sockaddr = Unix.sockaddr
type buf =
(char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t
val stdin : Uwt_base.file
val stdout : Uwt_base.file
val stderr : Uwt_base.file
module Iovec_write :
sig
type t =
Bigarray of Uwt_base.buf * int * int
| String of string * int * int
| Bytes of bytes * int * int
val drop :
Uwt_base.Iovec_write.t list -> int -> Uwt_base.Iovec_write.t list
type ts =
Invalid
| Empty
| All_ba of Uwt_base.Iovec_write.t array *
Uwt_base.Iovec_write.t list
val prep_for_cstub :
Uwt_base.Iovec_write.t list -> Uwt_base.Iovec_write.ts
val length : Uwt_base.Iovec_write.t -> int
end
module Fs_types :
sig
type uv_open_flag =
O_RDONLY
| O_WRONLY
| O_RDWR
| O_NONBLOCK
| O_CREAT
| O_EXCL
| O_TRUNC
| O_APPEND
| O_NOCTTY
| O_DSYNC
| O_SYNC
| O_RSYNC
| O_TEMPORARY
| O_SHORT_LIVED
| O_SEQUENTIAL
| O_RANDOM
| O_DIRECT
| O_EXLOCK
| O_NOATIME
| O_SYMLINK
| O_NOFOLLOW
| O_DIRECTORY
type file_kind =
S_REG
| S_DIR
| S_CHR
| S_BLK
| S_LNK
| S_FIFO
| S_SOCK
| S_UNKNOWN
type symlink_mode = S_Default | S_Dir | S_Junction
type access_permission = Read | Write | Exec | Exists
type stats = {
st_dev : int;
st_kind : Uwt_base.Fs_types.file_kind;
st_perm : int;
st_nlink : int;
st_uid : int;
st_gid : int;
st_rdev : int;
st_ino : int;
st_size : int64;
st_blksize : int;
st_blocks : int;
st_flags : int;
st_gen : int;
st_atime : int64;
st_atime_nsec : int;
st_mtime : int64;
st_mtime_nsec : int;
st_ctime : int64;
st_ctime_nsec : int;
st_birthtime : int64;
st_birthtime_nsec : int;
}
type clone_mode = No_clone | Try_clone | Force_clone
end
module type Fs_functions =
sig
type uv_open_flag =
Fs_types.uv_open_flag =
O_RDONLY
| O_WRONLY
| O_RDWR
| O_NONBLOCK
| O_CREAT
| O_EXCL
| O_TRUNC
| O_APPEND
| O_NOCTTY
| O_DSYNC
| O_SYNC
| O_RSYNC
| O_TEMPORARY
| O_SHORT_LIVED
| O_SEQUENTIAL
| O_RANDOM
| O_DIRECT
| O_EXLOCK
| O_NOATIME
| O_SYMLINK
| O_NOFOLLOW
| O_DIRECTORY
type file_kind =
Fs_types.file_kind =
S_REG
| S_DIR
| S_CHR
| S_BLK
| S_LNK
| S_FIFO
| S_SOCK
| S_UNKNOWN
type symlink_mode =
Fs_types.symlink_mode =
S_Default
| S_Dir
| S_Junction
type access_permission =
Fs_types.access_permission =
Read
| Write
| Exec
| Exists
type stats =
Fs_types.stats = {
st_dev : int;
st_kind : file_kind;
st_perm : int;
st_nlink : int;
st_uid : int;
st_gid : int;
st_rdev : int;
st_ino : int;
st_size : int64;
st_blksize : int;
st_blocks : int;
st_flags : int;
st_gen : int;
st_atime : int64;
st_atime_nsec : int;
st_mtime : int64;
st_mtime_nsec : int;
st_ctime : int64;
st_ctime_nsec : int;
st_birthtime : int64;
st_birthtime_nsec : int;
}
type clone_mode = No_clone | Try_clone | Force_clone
type 'a t
val openfile :
?perm:int ->
mode:uv_open_flag list ->
string -> Uwt_base.file Uwt_base.Fs_functions.t
val read :
?pos:int ->
?len:int -> Uwt_base.file -> buf:bytes -> int Uwt_base.Fs_functions.t
val read_ba :
?pos:int ->
?len:int ->
Uwt_base.file -> buf:Uwt_base.buf -> int Uwt_base.Fs_functions.t
val pread :
?pos:int ->
?len:int ->
Uwt_base.file ->
fd_offset:int64 -> buf:bytes -> int Uwt_base.Fs_functions.t
val pread_ba :
?pos:int ->
?len:int ->
Uwt_base.file ->
fd_offset:int64 -> buf:Uwt_base.buf -> int Uwt_base.Fs_functions.t
val write :
?pos:int ->
?len:int -> Uwt_base.file -> buf:bytes -> int Uwt_base.Fs_functions.t
val write_string :
?pos:int ->
?len:int ->
Uwt_base.file -> buf:string -> int Uwt_base.Fs_functions.t
val write_ba :
?pos:int ->
?len:int ->
Uwt_base.file -> buf:Uwt_base.buf -> int Uwt_base.Fs_functions.t
val pwrite :
?pos:int ->
?len:int ->
Uwt_base.file ->
fd_offset:int64 -> buf:bytes -> int Uwt_base.Fs_functions.t
val pwrite_string :
?pos:int ->
?len:int ->
Uwt_base.file ->
fd_offset:int64 -> buf:string -> int Uwt_base.Fs_functions.t
val pwrite_ba :
?pos:int ->
?len:int ->
Uwt_base.file ->
fd_offset:int64 -> buf:Uwt_base.buf -> int Uwt_base.Fs_functions.t
val writev :
Uwt_base.file ->
Uwt_base.Iovec_write.t list -> int Uwt_base.Fs_functions.t
val pwritev :
Uwt_base.file ->
Uwt_base.Iovec_write.t list -> int64 -> int Uwt_base.Fs_functions.t
val close : Uwt_base.file -> unit Uwt_base.Fs_functions.t
val unlink : string -> unit Uwt_base.Fs_functions.t
val mkdir : ?perm:int -> string -> unit Uwt_base.Fs_functions.t
val rmdir : string -> unit Uwt_base.Fs_functions.t
val fsync : Uwt_base.file -> unit Uwt_base.Fs_functions.t
val fdatasync : Uwt_base.file -> unit Uwt_base.Fs_functions.t
val ftruncate :
Uwt_base.file -> len:int64 -> unit Uwt_base.Fs_functions.t
val stat : string -> stats Uwt_base.Fs_functions.t
val lstat : string -> stats Uwt_base.Fs_functions.t
val fstat : Uwt_base.file -> stats Uwt_base.Fs_functions.t
val rename : src:string -> dst:string -> unit Uwt_base.Fs_functions.t
val link :
target:string -> link_name:string -> unit Uwt_base.Fs_functions.t
val symlink :
?mode:symlink_mode ->
src:string -> dst:string -> unit -> unit Uwt_base.Fs_functions.t
val mkdtemp : string -> string Uwt_base.Fs_functions.t
val sendfile :
?pos:int64 ->
?len:nativeint ->
dst:Uwt_base.file ->
src:Uwt_base.file -> unit -> nativeint Uwt_base.Fs_functions.t
val utime :
string -> access:float -> modif:float -> unit Uwt_base.Fs_functions.t
val futime :
Uwt_base.file ->
access:float -> modif:float -> unit Uwt_base.Fs_functions.t
val readlink : string -> string Uwt_base.Fs_functions.t
val access :
string -> access_permission list -> unit Uwt_base.Fs_functions.t
val chmod : string -> perm:int -> unit Uwt_base.Fs_functions.t
val fchmod : Uwt_base.file -> perm:int -> unit Uwt_base.Fs_functions.t
val chown :
string -> uid:int -> gid:int -> unit Uwt_base.Fs_functions.t
val fchown :
Uwt_base.file -> uid:int -> gid:int -> unit Uwt_base.Fs_functions.t
val lchown :
string -> uid:int -> gid:int -> unit Uwt_base.Fs_functions.t
val scandir :
string -> (file_kind * string) array Uwt_base.Fs_functions.t
val realpath : string -> string Uwt_base.Fs_functions.t
val copyfile :
?excl:bool ->
?clone:clone_mode ->
src:string -> dst:string -> unit -> unit Uwt_base.Fs_functions.t
end
module Conv :
sig
val of_unix_sockaddr_exn : Unix.sockaddr -> Uwt_base.sockaddr
val to_unix_sockaddr_exn : Uwt_base.sockaddr -> Unix.sockaddr
val file_of_file_descr : Unix.file_descr -> Uwt_base.file option
val file_descr_of_file : Uwt_base.file -> Unix.file_descr option
end
module Misc :
sig
type timeval = { sec : int; usec : int; }
type rusage = {
utime : Uwt_base.Misc.timeval;
stime : Uwt_base.Misc.timeval;
maxrss : int64;
ixrss : int64;
idrss : int64;
isrss : int64;
minflt : int64;
majflt : int64;
nswap : int64;
inblock : int64;
outblock : int64;
msgsnd : int64;
msgrcv : int64;
nsignals : int64;
nvcsw : int64;
nivcsw : int64;
}
type cpu_times = {
user : int64;
nice : int64;
sys : int64;
idle : int64;
irq : int64;
}
type cpu_info = {
model : string;
speed : int;
cpu_times : Uwt_base.Misc.cpu_times;
}
type interface_address = {
name : string;
phys_addr : string;
is_internal : bool;
address : Uwt_base.sockaddr option;
netmask : Uwt_base.sockaddr option;
}
type handle_type = File | Tty | Pipe | Tcp | Udp | Unknown
val guess_handle : Unix.file_descr -> Uwt_base.Misc.handle_type
val resident_set_memory : unit -> int64 Uwt_base.uv_result
val resident_set_memory_exn : unit -> int64
val uptime : unit -> float Uwt_base.uv_result
val uptime_exn : unit -> float
val getrusage : unit -> Uwt_base.Misc.rusage Uwt_base.uv_result
val getrusage_exn : unit -> Uwt_base.Misc.rusage
val cpu_info : unit -> Uwt_base.Misc.cpu_info array Uwt_base.uv_result
val cpu_info_exn : unit -> Uwt_base.Misc.cpu_info array
val interface_addresses :
unit -> Uwt_base.Misc.interface_address array Uwt_base.uv_result
val interface_addresses_exn :
unit -> Uwt_base.Misc.interface_address array
val load_avg : unit -> float * float * float
val ip4_addr : string -> int -> Uwt_base.sockaddr Uwt_base.uv_result
val ip4_addr_exn : string -> int -> Uwt_base.sockaddr
val ip4_name : Uwt_base.sockaddr -> string Uwt_base.uv_result
val ip4_name_exn : Uwt_base.sockaddr -> string
val ip6_addr : string -> int -> Uwt_base.sockaddr Uwt_base.uv_result
val ip6_addr_exn : string -> int -> Uwt_base.sockaddr
val ip6_name : Uwt_base.sockaddr -> string Uwt_base.uv_result
val ip6_name_exn : Uwt_base.sockaddr -> string
val get_total_memory : unit -> int64
val hrtime : unit -> int64
type version = { major : int; minor : int; patch : int; }
val version : unit -> Uwt_base.Misc.version
val version_raw : unit -> int
val version_string : unit -> string
val os_homedir : unit -> string Uwt_base.uv_result
val os_tmpdir : unit -> string Uwt_base.uv_result
val get_passwd : unit -> Unix.passwd_entry Uwt_base.uv_result
val exepath : unit -> string Uwt_base.uv_result
val cwd : unit -> string Uwt_base.uv_result
val chdir : string -> Uwt_base.Int_result.unit
val getenv : string -> string Uwt_base.uv_result
val putenv : key:string -> data:string -> Uwt_base.Int_result.unit
val unsetenv : string -> Uwt_base.Int_result.unit
val getppid : unit -> Uwt_base.Int_result.int
val set_process_title : string -> Uwt_base.Int_result.unit
val get_process_title : unit -> string Uwt_base.uv_result
end
module Sys_info :
sig
type os =
Windows
| Android
| Linux
| Mac
| Freebsd
| Openbsd
| Cygwin
| Netbsd
| Sun
| Hp
| Dragonfly
| Aix
| Minix
| KFreebsd
| Bsd
| Unknown
val os : Uwt_base.Sys_info.os
type win_version = {
major_version : int;
minor_version : int;
build_number : int;
platform_id : int;
csd_version : string;
}
val win_version :
unit -> Uwt_base.Sys_info.win_version Uwt_base.uv_result
end
end