Reading and Writing to specific lines in a file

Does anyone know how to read a specific line from a file and write to a specific line in a file?

something like this:
file:write_line(LINENUMBER, DATA_TO_WRITE)
string = file:read_line(LINENUMBER)

Is this possible?

If it's not I'd like to use SQL lite but I dont know if its persistent from app session to app session?

You could read the file into a table line by line, then you can access the line you want using the table pos then write it back in to the file when you're finished.

Wouldn't this require writing the whole table over the existing file whenever I wanted to change something? I feel like this would take a lot of time to process.

views:1460 update:2011/9/27 18:14:54
corona forums © 2003-2011