[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] FileReader - go to line?



On Tuesday 16 June 2009 20:06:02 Dan Stowell wrote:
> FileReader:read has a "startRow" argument.

Yeah, but read reads all the data at once, which I want to avoid. Files could 
be quite big.

> If treating a FileReader as
> a Stream you can use things like .nextN to jump over a load of
> lines...

nextN seems to jump over a lot of characters. not really lines as such, it 
seems.

Hmm... FileReader.new creates a var stream, which is a file.
The method next there gets the next line of data, so I guess I could use that 
to skip forward some lines, by just reading it and not doing anything with the 
data...
I could then keep a track of which line was at what file position, so I can 
more easily change the position in the file afterwards.

I think I could make it :)

I just wondered if someone else already did to save me some work :)

sincerely,
Marije


>
> Dan
>
> 2009/6/17 nescivi <nescivi@xxxxxxxxx>:
> > Hiho,
> >
> > has anyone done things with FileReaders, like skipping to certain lines
> > in the file?
> >
> > This could be quite useful for controlling file playblack...
> >
> > sincerely,
> > Marije
> >
> >
> > _______________________________________________
> > sc-users mailing list
> >
> > info (subscription, etc.):
> > http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml archive:
> > https://listarc.bham.ac.uk/marchives/sc-users/
> > search: https://listarc.bham.ac.uk/lists/sc-users/search/




_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/