Usage
f::BinaryReader
f::BinaryWriter
f::TextReader
f::TextWriter
Signatures
coerce: % BinaryReader coerce: % BinaryWriter coerce: % TextReader coerce: % TextWriter
Parameter | Type | Description |
---|---|---|
f | % | a file |
Description
Converts the file f to to a binary or text reader or writer. This is necessary before reading from or writing to the file. The file must have been opened in an appropriate mode for reading or writing respectively.
Remarks
Coercing a file to a reader or writer allocates memory, so it is advisable to assign the resulting stream to a variable. Unlike the ones for String, those coercions do not reset the file to its beginning.