package ocp-build

  1. Overview
  2. Docs
type os_type =
  1. | WINDOWS
  2. | CYGWIN
  3. | UNIX
val os_type : os_type
type error =
  1. | E2BIG
  2. | EACCES
  3. | EAGAIN
  4. | EBADF
  5. | EBUSY
  6. | ECHILD
  7. | EDEADLK
  8. | EDOM
  9. | EEXIST
  10. | EFAULT
  11. | EFBIG
  12. | EINTR
  13. | EINVAL
  14. | EIO
  15. | EISDIR
  16. | EMFILE
  17. | ENAMETOOLONG
  18. | ENFILE
  19. | ENODEV
  20. | ENOENT
  21. | ENOEXEC
  22. | ENOLCK
  23. | ENOMEM
  24. | ENOSPC
  25. | ENOSYS
  26. | ENOTDIR
  27. | ENOTEMPTY
  28. | ENOTTY
  29. | ENXIO
  30. | EPERM
  31. | EPIPE
  32. | ERANGE
  33. | EROFS
  34. | ESPIPE
  35. | ESRCH
  36. | EXDEV
  37. | EWOULDBLOCK
  38. | EINPROGRESS
  39. | EALREADY
  40. | ENOTSOCK
  41. | EDESTADDRREQ
  42. | EMSGSIZE
  43. | EPROTOTYPE
  44. | ENOPROTOOPT
  45. | EPROTONOSUPPORT
  46. | ESOCKTNOSUPPORT
  47. | EOPNOTSUPP
  48. | EPFNOSUPPORT
  49. | EAFNOSUPPORT
  50. | EADDRINUSE
  51. | EADDRNOTAVAIL
  52. | ENETDOWN
  53. | ENETUNREACH
  54. | ENETRESET
  55. | ECONNABORTED
  56. | ECONNRESET
  57. | ENOBUFS
  58. | EISCONN
  59. | ENOTCONN
  60. | ESHUTDOWN
  61. | ETOOMANYREFS
  62. | ETIMEDOUT
  63. | ECONNREFUSED
  64. | EHOSTDOWN
  65. | EHOSTUNREACH
  66. | ELOOP
  67. | EOVERFLOW
  68. | EUNKNOWNERR of int
exception Unix_error of error * string * string
val error_message : error -> string
val handle_unix_error : ('a -> 'b) -> 'a -> 'b
val environment : unit -> string array
val getenv : string -> string
val putenv : string -> string -> unit
type process_status =
  1. | WEXITED of int
  2. | WSIGNALED of int
  3. | WSTOPPED of int
type wait_flag =
  1. | WNOHANG
  2. | WUNTRACED
val execv : string -> string array -> 'a
val execve : string -> string array -> string array -> 'a
val execvp : string -> string array -> 'a
val execvpe : string -> string array -> string array -> 'a
val getpid : unit -> int
val waitpid : wait_flag list -> int -> int * process_status
type file_descr
val stdin : file_descr
val stdout : file_descr
val stderr : file_descr
type open_flag =
  1. | O_RDONLY
  2. | O_WRONLY
  3. | O_RDWR
  4. | O_NONBLOCK
  5. | O_APPEND
  6. | O_CREAT
  7. | O_TRUNC
  8. | O_EXCL
  9. | O_NOCTTY
  10. | O_DSYNC
  11. | O_SYNC
  12. | O_RSYNC
  13. | O_SHARE_DELETE
  14. | O_CLOEXEC
  15. | O_KEEPEXEC
type file_perm = int
val openfile : string -> open_flag list -> file_perm -> file_descr
val close : file_descr -> unit
val read : file_descr -> string -> int -> int -> int
val write : file_descr -> string -> int -> int -> int
val single_write : file_descr -> string -> int -> int -> int
val in_channel_of_descr : file_descr -> in_channel
val out_channel_of_descr : file_descr -> out_channel
val descr_of_in_channel : in_channel -> file_descr
val descr_of_out_channel : out_channel -> file_descr
type seek_command =
  1. | SEEK_SET
  2. | SEEK_CUR
  3. | SEEK_END
val lseek : file_descr -> int -> seek_command -> int
type file_kind =
  1. | S_REG
  2. | S_DIR
  3. | S_CHR
  4. | S_BLK
  5. | S_LNK
  6. | S_FIFO
  7. | S_SOCK
type stats = {
  1. st_dev : int;
  2. st_ino : int;
  3. st_kind : file_kind;
  4. st_perm : file_perm;
  5. st_uid : int;
  6. st_gid : int;
  7. st_rdev : int;
  8. st_size : int;
  9. st_atime : float;
  10. st_mtime : float;
  11. st_ctime : float;
}
val stat : string -> stats
val lstat : string -> stats
val fstat : file_descr -> stats
val rename : string -> string -> unit
type access_permission =
  1. | R_OK
  2. | W_OK
  3. | X_OK
  4. | F_OK
val chmod : string -> file_perm -> unit
val access : string -> access_permission list -> unit
val dup : ?cloexec:bool -> file_descr -> file_descr
val dup2 : ?cloexec:bool -> file_descr -> file_descr -> unit
val set_nonblock : file_descr -> unit
val clear_nonblock : file_descr -> unit
val set_close_on_exec : file_descr -> unit
val clear_close_on_exec : file_descr -> unit
val mkdir : string -> file_perm -> unit
val rmdir : string -> unit
val chdir : string -> unit
val getcwd : unit -> string
val pipe : ?cloexec:bool -> unit -> file_descr * file_descr
type process_times = {
  1. tms_utime : float;
  2. tms_stime : float;
  3. tms_cutime : float;
  4. tms_cstime : float;
}
type tm = {
  1. tm_sec : int;
  2. tm_min : int;
  3. tm_hour : int;
  4. tm_mday : int;
  5. tm_mon : int;
  6. tm_year : int;
  7. tm_wday : int;
  8. tm_yday : int;
  9. tm_isdst : bool;
}
val time : unit -> float
val gettimeofday : unit -> float
val gmtime : float -> tm
val localtime : float -> tm
val mktime : tm -> float * tm
val strftime : string -> tm -> string
val sleep : int -> unit
val times : unit -> process_times
val utimes : string -> float -> float -> unit