[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
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
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pharo-dev