Concerning the encoding problem I would say so too…

But there's another "problem" with FS file streams, they are correctly 
programmed and have a 1 based index. Whereas existing FileStreams are 0 based 
(no clue why that..) 
As an example I remember that we could not dump MCZ files directly to 
FSFilestreams since the zip compressor relies on 0 based indexing…

I guess we need a big refactoring for this to work completely..

cami

On 2011-09-13, at 16:41, Lukas Renggli wrote:
> 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