Then you also need to specify an encoding. Otherwise it does not make
sense for a FSReadStream to return a String.

Strictly speaking the FSWriteStream shouldn't accept a String as input either.

Lukas

On 13 September 2011 16:36, Stéphane Ducasse <[email protected]> wrote:
> or strings and widestrings.
>
> Stef
> On Sep 13, 2011, at 4:11 PM, Alexandre Bergel wrote:
>
>> Looks like there is a confusion between binary and text stream
>>
>> Alexandre
>>
>> On 13 Sep 2011, at 11:09, Stéphane Ducasse wrote:
>>
>>> | working stream |
>>> working := FSFilesystem disk workingDirectory.
>>> stream := (working / 'foo.txt') writeStream.
>>> stream nextPutAll: 'Hello World'.
>>> stream close.
>>> stream := (working / 'foo.txt') readStream.
>>> stream contents.
>>>      returns
>>>      #[72 101 108 108 111 32 87 111 114 108 100]
>>>
>>> instead of 'Hello World'
>>>
>>> Does anybody have a fix..?
>>>
>>> Stef ( editing FS chapter).
>>>
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>>
>>
>
>
>



-- 
Lukas Renggli
www.lukas-renggli.ch

Reply via email to