PreviousUpNext

15.3.491  src/lib/std/src/io/winix-file-for-os–premicrothread.api

## winix-file-for-os--premicrothread.api
#
# This defines the api for our main platform-specific file I/O
# layer, built on the low-level file-io driver layer defined by
#
#     src/lib/std/src/io/winix-base-file-io-driver-for-os--premicrothread.api
#
# This gets specialized to the binary-file case in:
#
#     src/lib/std/src/io/winix-data-file-for-os--premicrothread.api

# Compiled by:
#     src/lib/std/src/standard-core.sublib


api Winix_File_For_Os__Premicrothread {
    #
    Vector;
    Element;

    Input_Stream;
    Output_Stream;

    read:                                Input_Stream -> Vector;
    read_one:                            Input_Stream -> Null_Or( Element );

    read_n:                             (Input_Stream, Int) -> Vector;
    read_all:                            Input_Stream -> Vector;

    peek:                                Input_Stream -> Null_Or( Element );                                    # Return next element in stream (if any) without advancing the file pointer.

    close_input:     Input_Stream -> Void;
    end_of_stream:   Input_Stream -> Bool;

    write:           (Output_Stream, Vector ) -> Void;
    write_one:       (Output_Stream, Element) -> Void;
    flush:            Output_Stream -> Void;
    close_output:     Output_Stream -> Void;
                                                                                                # Winix_Pure_File_For_Os__Premicrothread        is from   src/lib/std/src/io/winix-pure-file-for-os--premicrothread.api
    package pur:  Winix_Pure_File_For_Os__Premicrothread;                                                       # "pur" is short for "pure" (I/O).
                  sharing Vector  == pur::Vector;
                  sharing Element == pur::Element;

    make_instream:     pur::Input_Stream -> Input_Stream;

    get_instream:               Input_Stream -> pur::Input_Stream;
    set_instream:              (Input_Stream, pur::Input_Stream) -> Void;

    get_output_position:         Output_Stream -> pur::Out_Position;
    set_output_position:        (Output_Stream, pur::Out_Position) -> Void;

    make_outstream:         pur::Output_Stream -> Output_Stream;

    get_outstream:               Output_Stream -> pur::Output_Stream;
    set_outstream:              (Output_Stream, pur::Output_Stream) -> Void;
};



## COPYRIGHT (c) 1995 AT&T Bell Laboratories.
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext