Previous: , Up: stdlib io port   [Index]


5.8.2.13 Input/output ports

Procedure: open-file-input/output-port filename
Procedure: open-file-input/output-port filename file-options
Procedure: open-file-input/output-port filename file-options buffer-mode
Procedure: open-file-input/output-port filename file-options buffer-mode transcoder

Return a single port that is both an input port and an output port for the named file. The optional arguments default as described in the specification of open-file-output-port. If the input/output port supports port-position and/or set-port-position!, the same port position is used for both input and output.

Procedure: make-custom-binary-input/output-port id read! write! get-position set-position! close

Return a newly created binary input/output port whose byte source and sink are arbitrary algorithms represented by the read! and write! procedures.

id must be a string naming the new port, provided for informational purposes only.

read! and write! must be procedures, and should behave as specified for the make-custom-binary-input-port and make-custom-binary-output-port procedures.

Each of the remaining arguments may be #f; if any of those arguments is not #f, it must be a procedure and should behave as specified in the description of make-custom-binary-input-port.

Procedure: make-custom-textual-input/output-port id read! write! get-position set-position! close

Return a newly created textual input/output port whose textual source and sink are arbitrary algorithms represented by the read! and write! procedures.

id must be a string naming the new port, provided for informational purposes only.

read! and write! must be procedures, and should behave as specified for the make-custom-textual-input-port and make-custom-textual-output-port procedures.

Each of the remaining arguments may be #f; if any of those arguments is not #f, it must be a procedure and should behave as specified in the description of make-custom-textual-input-port.


Previous: , Up: stdlib io port   [Index]