The standard library Winix__Premicrothread api defines access to cross-platform OS functionality usable on both Windows and Posix (thus “Winix”) platforms. The Winix__Premicrothread api is thus an alternative to the Posixlib api offering increased portability at the cost of reduced functionality.
The Winix__Premicrothread api is implemented by the winix__premicrothread package.
The Winix__Premicrothread api source code is in src/lib/std/src/winix/winix–premicrothread.api.
See also: Posixlib. The above information is manually maintained and may contain errors.
api { System_Error; error_name : System_Error -> String; syserror : String -> Null_Or(System_Error ); 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 { Status = Int; success : Status; failure : Status; successful : Status -> Bool; bin_sh' : String -> Status; exit : Status -> Void; exit_uncleanly : Status -> Void; exit_x : Status -> X; exit_uncleanly_x : Status -> X; get_env : String -> Null_Or(String ); sleep : Float -> Void; get_process_id : Void -> Int;};; 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 : {timeout:Null_Or(time::Time ), wait_requests:List(Ioplea )} -> List(Ioplea_Result ); wait_for_io_opportunity__without_syscall_redirection : {timeout:Null_Or(time::Time ), wait_requests:List(Ioplea )} -> List(Ioplea_Result ); poll__syscall : (List(((Int , Unt)) ) , Null_Or(((one_word_int::Int , Int)) )) -> List(((Int , Unt)) ); set__poll__ref : ( {fun_name:String, io_call:(List(((Int , Unt)) ) , Null_Or(((one_word_int::Int , Int)) )) -> List(((Int , Unt)) ), lib_name:String} -> (List(((Int , Unt)) ) , Null_Or(((one_word_int::Int , Int)) )) -> List(((Int , Unt)) ) ) -> Void;};;};