[Pharo-project] Bug in FileSystem
Mariano Martinez Peck
marianopeck at gmail.com
Mon Jan 9 18:13:46 CET 2012
So, here it is: http://code.google.com/p/pharo/issues/detail?id=5161
On Sun, Jan 8, 2012 at 2:39 PM, Mariano Martinez Peck <marianopeck at gmail.com
>>> As for the API:
>> 1) There's no next: into: (which returns the amount read). It's really
>> the only way to do buffers without garbage allocations.
> Hi Henry. One of the extensions I needed to add to FSReadStream in order
> to make it work with Fuel was exatly #next:into:
> The method is:
> next: number into: aCollection
> | count |
> count := handle at: position read: aCollection startingAt: 1 count:
> position := position + count.
> ^ count < aCollection size
> ifTrue: [aCollection first: count]
> ifFalse: [aCollection]
> I didn't understand what you meant by "It's really the only way to do
> buffers without garbage allocations"
> So...should I integrate this method #next:into: as it is together to the
> fix to #read:
>> 2) FSHandle >>at: offset read: buffer startingAt: start count: count is a
>> weirdly named selector for what it does imho...
>> Doesn't #at: offset read: count into: buffer startingAt: start make more
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pharo-project