5.14 Module unix: interface to Unix system calls
Interface to the Ocaml library module Unix
open ml
type error
external error_message : < error > -> < string >
external environment : <> -> < string array >
external getpid : <> -> < int >
external getppid : <> -> < int >
type file_descr
external stdin : file_descr
external stdout : file_descr
external stderr : file_descr
type open_flag
external O_RDONLY : open_flag
external O_WRONLY : open_flag
external O_RDWR : open_flag
external O_NONBLOCK : open_flag
external O_APPEND : open_flag
external O_CREAT : open_flag
external O_TRUNC : open_flag
external O_EXCL : open_flag
external openfile : < string * open_flag list * int > -> < file_descr>
external close : < file_descr > -> <>
external read : < file_descr * string * int * int > -> < int>
external write : < file_descr * string * int * int > -> < int>
external in_channel_of_descr : < file_descr > -> < in_channel >
external out_channel_of_descr : < file_descr > -> < out_channel >
external descr_of_in_channel : < in_channel > -> < file_descr >
external descr_of_out_channel : < out_channel > -> < file_descr >
type seek_command
external SEEK_SET : seek_command
external SEEK_CUR : seek_command
external SEEK_END : seek_command
external lseek : < file_descr * int * seek_command > -> < int >
external truncate : < string * int > -> <>
external ftruncate : < file_descr * int > -> <>
external unlink : < string > -> <>
external rename : < string * string > -> <>
external link : < string * string > -> <>
external chmod : < string * int > -> <>
external fchmod : < file_descr * int > -> <>
external chown : < string * int * int > -> <>
external fchown : < file_descr * int * int > -> <>
external umask : < int > -> < int >
external dup : < file_descr > -> < file_descr >
external set_nonblock : < file_descr > -> <>
external clear_nonblock : < file_descr > -> <>
external set_close_on_exec : < file_descr > -> <>
external clear_close_on_exec : < file_descr > -> <>
type dir_handle
external mkdir : < string * int > -> <>
external rmdir : < string > -> <>
external chdir : < string > -> <>
external getcwd : <> -> < string >
external opendir : < string > -> < dir_handle >
external readdir : < dir_handle > -> < string >
external rewinddir : < dir_handle > -> <>
external closedir : < dir_handle > -> <>
external pipe : <> -> < file_descr * file_descr >
external mkfifo : < string * int > -> <>
external symlink : < string * string > -> <>
external readlink : < string > -> < string >
external pause : <> -> <>
external time : <> -> < float >
external gettimeofday : <> -> < float >
external sleep : < int > -> <>
external getuid : <> -> < int >
external geteuid : <> -> < int >
external setuid : < int > -> <>
external getgid : <> -> < int >
external getegid : <> -> < int >
external setgid : < int > -> <>
external getgroups : <> -> < int array >
external getlogin : <> -> < string >
external gethostname : <> -> < string >
external open_process_in : < string > -> < in_channel>
external open_process_out : < string > -> < out_channel>
external open_process : < string > -> < in_channel * out_channel>
external close_process_in : < in_channel > -> <>
external close_process_out : < out_channel > -> <>
external close_process : < in_channel * out_channel > -> <>