Go Down

Topic: SD card lib, seek to last line (Read 832 times) previous topic - next topic

stoopkid

Is it possible to seek to the last line of a file without having to read it all into memory? I want to be able to "pick up where I left off" in terms of number being played with but my file will be way too big to read through the whole thing.

Thanks.

PaulS

Quote
I want to be able to "pick up where I left off" in terms of number being played with

You can record where you last wrote to the file.

Are all the records the same size? If so, you could determine the file size, subtract the length of one record, and seek to that position.

Quote
but my file will be way too big to read through the whole thing.

Then, a redesign is in order, using multiple files to reduce the size of each.

Go Up
 

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.
Name:
Email:

shortcuts: alt+s submit/post or alt+p preview