34d42d586f875c7c6347a4cdef19aaab986d85a9
[bpt/guile.git] / module / slib / lineio.txi
1
2 @defun read-line
3
4
5 @defunx read-line port
6 Returns a string of the characters up to, but not including a
7 newline or end of file, updating @var{port} to point to the
8 character following the newline. If no characters are available, an
9 end of file object is returned. The @var{port} argument may be
10 omitted, in which case it defaults to the value returned by
11 @code{current-input-port}.
12 @end defun
13
14 @defun read-line! string
15
16
17 @defunx read-line! string port
18 Fills @var{string} with characters up to, but not including a newline or end
19 of file, updating the @var{port} to point to the last character read
20 or following the newline if it was read. If no characters are
21 available, an end of file object is returned. If a newline or end
22 of file was found, the number of characters read is returned.
23 Otherwise, @code{#f} is returned. The @var{port} argument may be
24 omitted, in which case it defaults to the value returned by
25 @code{current-input-port}.
26 @end defun
27
28 @defun write-line string
29
30
31 @defunx write-line string port
32 Writes @var{string} followed by a newline to the given @var{port} and returns
33 an unspecified value. The @var{Port} argument may be omitted, in
34 which case it defaults to the value returned by
35 @code{current-input-port}.@refill
36 @end defun
37
38 @defun display-file path
39
40
41 @defunx display-file path port
42 Displays the contents of the file named by @var{path} to @var{port}. The
43 @var{port} argument may be ommited, in which case it defaults to the
44 value returned by @code{current-output-port}.
45 @end defun