I need a way to write over lines in a specific file. As it is currently, I basically write to a file, then what I need to do is re-open the file, go back to a specific line in that file, and continue writing from there, overwriting whatever was there before it. Any information on how to do so would be greatly appreciated.
Share
Figured this out finally. Easiest way I found to do this was to read the lines of the file into a buffer and stop reading them in once you hit a specific marker that you’re looking for. From there, you wipe the file and re-write the lines in the buffer to it. From there, you can continue writing from where you left off. This is only really a good idea for smaller files.