[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.21.3.5 Other file operations

Function: sys-chdir dir
[POSIX] An interface to chdir(2). See also current-directory (See section 11.6.1 Directory utilities).

Function: sys-pipe &keyword (buffering :line)
[POSIX] Creates a pipe, and returns two ports. The first returned port is an input port and the second is an output port. The data put to the output port can be read from the input port.

Buffering can be :full, :line or :none, and specifies the buffering mode of the ports opened on the pipe. See section 6.18.3 File ports, for details of the buffering mode. The default mode is sufficient for typical cases.

 
(receive (in out) (sys-pipe)
  (display "abc\n" out)
  (flush out)
  (read-line in)) => "abc"

Note: the returned value is changed from version 0.3.15, in which sys-pipe returned a list of two ports.

Function: sys-mkfifo path mode
[POSIX] creates a fifo (named pipe) with a name path and mode mode. Mode must be a positive exact integer to represent the file mode.

Function: sys-isatty port-or-fd
[POSIX] port-or-fd may be a port or an integer file descriptor. Returns #t if the port is connected to the console, #f otherwise.

Function: sys-ttyname port-or-fd
[POSIX] port-or-fd may be a port or an integer file descriptor. Returns the name of the terminal connected to the port, or #f if the port is not connected to a terminal.



This document was generated by Ken Dickey on November, 28 2002 using texi2html