G.f method
Creates and opens a stream over a file.
make file-stream-class #key filename direction
if-exists if-does-not-exist
buffer-size element-type
=> file-stream-instance
<file-stream>.
<object>.
#"input", #"output", or #"input-output". The default is #"input".
#f, #"new-version", #"overwrite", #"replace", #"append", #"truncate", #"signal". Default value: #f.
#f, #"signal", or #"create". Default value: depends on the value of direction.
<integer>.
<byte-character>, <unicode-character>, or <byte>, or #f.
An instance of <file-stream>.
io
streams
Creates and opens a stream over a file.
Returns a new instance of a concrete subclass of <file-stream> that streams over the contents of the file referenced by filename. To determine the concrete subclass to be instantiated, this method calls the generic function type-for-file-stream.
The filename init-keyword should be a string naming a file. If the Locators library is in use, filename should be an instance of <locator> or a string that can be coerced to one.
The direction init-keyword specifies the direction of the stream.
The if-exists and if-does-not-exist init-keywords specify actions to take if the file named by filename does or does not already exist when the stream is created. These init-keywords are discussed in more detail in Section 5.5.1.2 on page 38.
The buffer-size init-keyword is explained in <buffered-stream>, page 36.
The element-type init-keyword specifies the type of the elements in the file named by filename. This allows file elements to be represented abstractly; for instance, contiguous elements could be treated as a single database record. This init-keyword defaults to something useful, potentially based on the properties of the file; <byte-character> and <unicode-character> are likely choices. See Section 5.5.1.2 on page 38.