document `file->list'
fix typos in contracts. svn: r17134
This commit is contained in:
parent
771b203610
commit
ca5f5656c0
|
@ -593,17 +593,6 @@ Reads all characters from @scheme[path] and returns them as a
|
||||||
@tech{byte string}. The @scheme[mode-flag] argument is the same as
|
@tech{byte string}. The @scheme[mode-flag] argument is the same as
|
||||||
for @scheme[open-input-file].}
|
for @scheme[open-input-file].}
|
||||||
|
|
||||||
@defproc[(file->lines [path path-string?]
|
|
||||||
[#:mode mode-flag (or/c 'binary 'text) 'binary]
|
|
||||||
[#:line-mode line-mode (or/c 'linefeed 'return 'return-linefeed 'any 'any-one) 'any])
|
|
||||||
bytes?]{
|
|
||||||
|
|
||||||
Read all characters from @scheme[path], breaking them into lines. The
|
|
||||||
@scheme[line-mode] argument is the same as the second argument to
|
|
||||||
@scheme[read-line], but the default is @scheme['any] instead of
|
|
||||||
@scheme['linefeed]. The @scheme[mode-flag] argument is the same as for
|
|
||||||
@scheme[open-input-file].}
|
|
||||||
|
|
||||||
@defproc[(file->value [path path-string?]
|
@defproc[(file->value [path path-string?]
|
||||||
[#:mode mode-flag (or/c 'binary 'text) 'binary])
|
[#:mode mode-flag (or/c 'binary 'text) 'binary])
|
||||||
bytes?]{
|
bytes?]{
|
||||||
|
@ -612,10 +601,29 @@ Reads a single S-expression from @scheme[path] using @scheme[read].
|
||||||
The @scheme[mode-flag] argument is the same as for
|
The @scheme[mode-flag] argument is the same as for
|
||||||
@scheme[open-input-file].}
|
@scheme[open-input-file].}
|
||||||
|
|
||||||
|
@defproc[(file->list [path path-string?]
|
||||||
|
[proc (input-port? . -> . any/c) read]
|
||||||
|
[#:mode mode-flag (or/c 'binary 'text) 'binary])
|
||||||
|
(listof any/c)]{
|
||||||
|
Repeatedly calls @scheme[proc] to consume the contents of
|
||||||
|
@scheme[path], until @scheme[eof] is produced. The @scheme[mode-flag]
|
||||||
|
argument is the same as for @scheme[open-input-file]. }
|
||||||
|
|
||||||
|
@defproc[(file->lines [path path-string?]
|
||||||
|
[#:mode mode-flag (or/c 'binary 'text) 'binary]
|
||||||
|
[#:line-mode line-mode (or/c 'linefeed 'return 'return-linefeed 'any 'any-one) 'any])
|
||||||
|
(listof string?)]{
|
||||||
|
|
||||||
|
Read all characters from @scheme[path], breaking them into lines. The
|
||||||
|
@scheme[line-mode] argument is the same as the second argument to
|
||||||
|
@scheme[read-line], but the default is @scheme['any] instead of
|
||||||
|
@scheme['linefeed]. The @scheme[mode-flag] argument is the same as for
|
||||||
|
@scheme[open-input-file].}
|
||||||
|
|
||||||
@defproc[(file->bytes-lines [path path-string?]
|
@defproc[(file->bytes-lines [path path-string?]
|
||||||
[#:mode mode-flag (or/c 'binary 'text) 'binary]
|
[#:mode mode-flag (or/c 'binary 'text) 'binary]
|
||||||
[#:line-mode line-mode (or/c 'linefeed 'return 'return-linefeed 'any 'any-one) 'any])
|
[#:line-mode line-mode (or/c 'linefeed 'return 'return-linefeed 'any 'any-one) 'any])
|
||||||
bytes?]{
|
(listof bytes?)]{
|
||||||
|
|
||||||
Like @scheme[file->lines], but reading bytes and collecting them into
|
Like @scheme[file->lines], but reading bytes and collecting them into
|
||||||
lines like @scheme[read-bytes-line].}
|
lines like @scheme[read-bytes-line].}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user