[Pharo-dev] In-memory FileSystem write streams not being polymorphic

Nicolás Papagna Maldonado nicolas.papagna at gmail.com
Mon Nov 11 08:19:26 EST 2013

Hi all!

I've been working in a fix of PharoFilesOpener and decided to test the
current behavior first before changing it, so I extracted the dependency to
FileSystem and tried to use an instance created through FileSystem memory
for testing.

The code gets the write stream for a file and then sends the #isReadOnly
message to do some stuff.

The thing is that the streams returned form the in-memory file system are
instances of WriteStream (see MemoryHandle >> writeStream) instead of
StandardFileStream (see FileHandle >> writeStream) and so they don't
respond the #isReadOnly message.

Is this the expected way the in-memory file system should work? Shouldn't
it return polymorphic file streams?

If this is a bug, what change would you recommend to do?
I was thinking about returning StandardFileStreams instances from
MemoryHandle >> writeStream.


Nico PM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20131111/0bc31d57/attachment-0002.html>

More information about the Pharo-dev mailing list