Changes between Version 5 and Version 6 of FilesAdvancedCowan


Ignore:
Timestamp:
11/28/12 14:43:48 (5 years ago)
Author:
cowan
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FilesAdvancedCowan

    v5 v6  
    3030Returns `#t` if the port supports the `port-position` operation, and `#f` otherwise. 
    3131 
    32 `(set-port-position `''port''` `''position''`)` 
     32`(set-port-position! `''port''` `''position''`)` 
    3333 
    3434Changes the current position of ''port''.  If port is a binary port, and ''position'' is a non-negative exact integer object, it is used as the index of the position at which the next byte will be read from or written to the port. If port is a textual port, and ''position'' is the return value of a preceding call to `port-position` on ''port'', then the next character will be read or written from that position.  If ''port'' is a binary output port and the ''position'' is beyond the current end of the data, `set-port-position!` will succeed, but the contents of any intervening positions are unspecified. 
    3535 
    36 Calling this procedure on ''port'' resets the buffer state, allowing a binary operation to follow even if the previous operation was textual, an input operation to follow even if the previous operation was output, or an output operation to follow even if the previous operation of input. 
     36Calling this procedure on ''port'' resets the buffer state, allowing a binary operation to follow even if the previous operation was textual, an input operation to follow even if the previous operation was an output, or an output operation to follow even if the previous operation was an input. 
    3737 
    3838`(can-set-port-position? `''port''`)` 
     
    4848Returns `#t` if the next attempt to read a character from ''port'' would return an eof-object, and `#f` otherwise. 
    4949 
    50 `(read-string `''n''` `[ ''port'' ]`)` 
     50`(read-string! `''string'' [ ''port'' [ ''start'' [ ''end'' ] ] ] `)` 
    5151 
    52 Reads at most ''n'' characters from ''port'' and returns them as a newly allocated string.  If fewer characters can be read, they are returned.  If no characters can be read, an eof-object is returned.  The default port is the value of `(current-input-port)`. 
     52Reads the next ''end'' − ''start'' characters, or as many as are available before the end of file, from the binary input ''port'' into ''string'' in left-to-right order beginning at the ''start'' position. If ''end'' is not supplied, reads until the end of ''string'' has been reached. If ''start'' is not supplied, reads beginning at position 0. Returns the number of characters read. 
     53If no characters are available, an end-of-file object is returned. 
    5354 
    54 `(read-string! `''n''` `''string''` `''start''` `[ ''port'' ]`)` 
     55`(read-lines ` [ ''input-port'' ]`)` 
    5556 
    56 Reads at most ''n'' characters from ''port'' and places them into ''string'' starting at position ''start''.  If there is insufficient room in ''string'', it is filled up and no further characters are read.  If fewer than ''n'' characters can be read from ''port'', they are used.  If no characters at all can be read, an eof-object is returned.  The default port is the value of `(current-input-port)`. 
    57  
    58 `(write-string `''string''` `''start''` `''end''` `[''port'']`)` 
    59  
    60 Reads characters from ''string'' beginning at ''start'' (inclusive) and ending at ''end'' (exclusive) to ''port''.  The default port is the value of `(current-output-port)`. 
     57Read all remaining characters in ''input-port'' as if by `read-line`, and return a list of strings representing the lines. 
    6158 
    6259`(read-all-bytes ` [''port'']`)` 
     
    8380 
    8481Converts ''bytevector'' to a string using the keys `encoding`, `newline`, `encoding-error`, and possibly other implementation-specific keys in ''settings-list'', and returns the bytevector. 
    85