The standard library Winix api defines the root cross-platform I/O api for multithread programming.
The Winix api is implemented by the winix package.
The Winix api source code is in src/lib/src/lib/thread-kit/src/winix/winix.api. The above information is manually maintained and may contain errors.
api { System_Error; error_name : System_Error -> String; error_msg : System_Error -> String; exception RUNTIME_EXCEPTION (String , Null_Or(System_Error )); package file : api { Directory_Stream; open_directory_stream : String -> Directory_Stream; read_directory_entry : Directory_Stream -> Null_Or(String ); rewind_directory_stream : Directory_Stream -> Void; close_directory_stream : Directory_Stream -> Void; change_directory : String -> Void; current_directory : Void -> String; make_directory : String -> Void; remove_directory : String -> Void; is_directory : String -> Bool; is_symlink : String -> Bool; read_symlink : String -> String; full_path : String -> String; real_path : String -> String; file_size : String -> Int; last_file_modification_time : String -> time::Time; set_last_file_modification_time : (String , Null_Or(time::Time )) -> Void; remove_file : String -> Void; rename_file : {from:String, to:String} -> Void; Access_Mode = MAY_EXECUTE | MAY_READ | MAY_WRITE; access : (String , List(Access_Mode )) -> Bool; tmp_name : Void -> String; eqtype File_Id; file_id : String -> File_Id; hash : File_Id -> Unt; compare : (File_Id , File_Id) -> Order; tmp_name__syscall : Void -> String; set__tmp_name__ref : ({fun_name:String, io_call:Void -> String, lib_name:String} -> Void -> String) -> Void;};; package path : api { exception PATH; parent_arc : String; current_arc : String; volume_is_valid : {disk_volume:String, is_absolute:Bool} -> Bool; from_string : String -> {arcs:List(String ), disk_volume:String, is_absolute:Bool}; to_string : {arcs:List(String ), disk_volume:String, is_absolute:Bool} -> String; get_volume : String -> String; get_parent : String -> String; split_path_into_dir_and_file : String -> {dir:String, file:String}; make_path_from_dir_and_file : {dir:String, file:String} -> String; dir : String -> String; file : String -> String; split_base_ext : String -> {base:String, ext:Null_Or(String )}; join_base_ext : {base:String, ext:Null_Or(String )} -> String; base : String -> String; ext : String -> Null_Or(String ); make_canonical : String -> String; is_canonical : String -> Bool; make_absolute : {path:String, relative_to:String} -> String; make_relative : {path:String, relative_to:String} -> String; is_absolute : String -> Bool; is_relative : String -> Bool; is_root : String -> Bool; cat : (String , String) -> String; from_unix_path : String -> String; to_unix_path : String -> String;};; package process : api { eqtype Status; success : Status; failure : Status; bin_sh' : String -> Status; bin_sh'_mailop : String -> Mailop(Status ); exit : Status -> X; exit_uncleanly : Status -> X; get_env : String -> Null_Or(String );};; package io : api { eqtype Iod; Iod_Kind = BLOCK_DEVICE | CHAR_DEVICE | DIRECTORY | FILE | OTHER | PIPE | SOCKET | SYMLINK; hash : Iod -> Unt; compare : (Iod , Iod) -> Order; iod_to_iodkind : Iod -> ?.winix_types::Iod_Kind; Ioplea = {io_descriptor:Iod, oobdable:Bool, readable:Bool, writable:Bool}; Ioplea_Result = Ioplea; exception BAD_WAIT_REQUEST; wait_for_io_opportunity : (List(Ioplea ) , Null_Or(Float )) -> List(Ioplea_Result ); wait_for_io_opportunity_mailop : List(Ioplea ) -> Mailop(List(Ioplea_Result ) );};;};