I've found a way to write a string to a random access file at a certain point in the file, but it overwrites the text that was there before. Is there a way to 'insert' new text in the middle of a file and move all the stuff that was there before to a position after the newly written string? Thanks a lot.
posted 14 years ago
There's no single command for this. Basically you've got to grab all the bytes from the insert to the end of the file, and copy them to new positions later in the file. Then write whatever you want to insert, on top of the old byte values that you just copied to new locations.