View Single Post
Old Aug 13th, 2007, 3:09 AM   #7
Keiro
Newbie
 
Join Date: Nov 2006
Location: Here!!!
Posts: 7
Rep Power: 0 Keiro is on a distinguished road
I said read the file backwards in terms of lines because I thought there was an effective method of doing so rather then loading to memory then reading from there which is slow. ^^'' Oops.

Quote:
Originally Posted by Dameon View Post
Since you mentioned appending to a file:
If you intend to insert lines at the beginning, you will have to shift the existing contents down. This involves reading in and writing out everything already there, of course, so will take even longer as files get bigger.
Ah, now thats more like it. Shifting lines down then added the new content at the begining. Is there a way to do that instead?
Keiro is offline   Reply With Quote