Re: [Pharo-project] how to get a string read stream from filesystem

2012-03-27 Thread Philippe Marschall
On 11/19/2011 03:11 PM, Tudor Girba wrote: Hi, Thanks. I know that the ByteArray is the data structure, but I would like to get a stream that decodes the information and lets me traverse characters, rather than bytes. What information? Which encoding? Cheers Philippe

Re: [Pharo-project] how to get a string read stream from filesystem

2012-03-27 Thread Stéphane Ducasse
On Mar 27, 2012, at 3:33 AM, Sean P. DeNigris wrote: Lukas Renggli wrote As I just wrote a few days ago, you must use... #fileStreamDo: ...to get the traditional system stream I just ran into this. To start, how about a comment in #readStream and friends pointing this out? please

Re: [Pharo-project] how to get a string read stream from filesystem

2012-03-26 Thread Sean P. DeNigris
Lukas Renggli wrote As I just wrote a few days ago, you must use... #fileStreamDo: ...to get the traditional system stream I just ran into this. To start, how about a comment in #readStream and friends pointing this out? Sean -- View this message in context:

Re: [Pharo-project] how to get a string read stream from filesystem

2011-11-19 Thread Tudor Girba
Hi, Thanks. I know that the ByteArray is the data structure, but I would like to get a stream that decodes the information and lets me traverse characters, rather than bytes. By retrieving aReference readStream contents asString I first get all the ByteArray in memory, and then create another

Re: [Pharo-project] how to get a string read stream from filesystem

2011-11-19 Thread Stéphane Ducasse
Doru FS should be usable so if you have suggestions and code please send them. Stef Hi, Thanks. I know that the ByteArray is the data structure, but I would like to get a stream that decodes the information and lets me traverse characters, rather than bytes. By retrieving aReference

Re: [Pharo-project] how to get a string read stream from filesystem

2011-11-19 Thread Lukas Renggli
As I just wrote a few days ago, you must use #fileStreamDo: or #fileStreamWriteable:do: to get the traditional system stream that supports ascii/binary and various convertors. The streams built into FileSystem are minimal ANSI streams. They are supposed to be wrapped by something more

Re: [Pharo-project] how to get a string read stream from filesystem

2011-11-19 Thread Stéphane Ducasse
The problem is that now we should not open a new task. I would like to close the pending ones: debugger rpackage ring (methodreference and friends) opal May be for 1.5. now for 1.4 we should finish the current ones. stef On Nov 19, 2011, at 5:31 PM, Lukas Renggli

[Pharo-project] how to get a string read stream from filesystem

2011-11-17 Thread Tudor Girba
Hi, I am using Filesystem, and I would like to get a read stream that provides a string instead of bytes. If I do aReference readStream, I get a FSReadStream which is a byte stream. To get to the string, I now do the ugly: aReference readStream contents asString Is there a cleverer way?

Re: [Pharo-project] how to get a string read stream from filesystem

2011-11-17 Thread Norbert Hartl
Am 17.11.2011 um 22:01 schrieb Tudor Girba: Hi, I am using Filesystem, and I would like to get a read stream that provides a string instead of bytes. If I do aReference readStream, I get a FSReadStream which is a byte stream. To get to the string, I now do the ugly: aReference

Re: [Pharo-project] how to get a string read stream from filesystem

2011-11-17 Thread Max Leske
Hi Doru The last time I used FS that was the way to do it. Maybe what you want could be accomplished by adding convenience methods to FSReadStream like #stringContents or something. Anyway, I agree with Norbert that a ByteArray is really the data structure that you should expect to get from a