If you have a MultiByteFileStream you can do

stream position: stream size - 200.
stream next: 200.

Have a look at RemoteString, which is the class used to read the source
from the source and changes files (without loading all of them into memory)


On Fri, Jun 27, 2014 at 6:15 PM, p...@highoctane.be <p...@highoctane.be>
wrote:

> I wonder how you guys would read the last n lines from a file in Pharo
> without reading through the whole thing.
>
> Is there code doing just that somewhere?
>
> The code I have is a shell script doing a 'tac file | tail -200 >
> /temp/something'
>
> I can always do that through OSProcess but wondered if there was something
> available.
>
> Reading through with a 200-entries FIFO circular buffer seems a bit silly
> to do.
>
> TIA
> Phil
>
>
>

Reply via email to