2018-03-20 13:20 GMT+01:00 Henrik Sperre Johansen <henrik.s.johansen@veloxit.no>:
EstebanLM wrote
On 20 Mar 2018, at 12:56, Henrik Sperre Johansen <
henrik.s.johansen@
> wrote:
This is great! And, +1 on the need for some more convenience constructors...
Word of warning (which would be nice to mention in the guide); using writeStreamDo: and manually constructed buffered writers will not #flush the buffered stream automatically on close, so it's crucial this is done manually.
well⦠in fact it should flush it, isnât?
The binary filestream flushes to disk on each write operation iirc (or, at least when it is being closed), but it has no way to know it is wrapped by a buffered stream which also needs to be flushed to actually write the remaining buffer contents to file.
Could a binary filestream that has flush requirements (and close requirements as well) be made aware of the presence of the buffered stream above it to ensure a close / flush is done correctly? Could structures where you have multiple buffered streams concurrently opened on a single binary file stream considered as not exactly correct? Thierry
Cheers, Henry
-- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html