Unless the file object has been supplied with a method for this, which I'm not aware of, since I still primarily use C, you have to do it in a way that's consistent with the cluster organization of the filesystem. Unlike append, there is no corresponding open mode for insertion, because there is no straightforward way to insert. You have two choices:
1) You can read the file into memory, save the start address as a pointer, save the insertion point as a pointer, and allocate memory for the insertion string, then rewrite the file from start up to, but not including, the insertion point, then the string, then from the insertion point. You can't avoid having to overwrite, so you have to deal with it.
2) You can open a temp file for writing, read from the original and write to the temp up to the insertion point, write the insertion text into the temp file, and then read from the original and write to the temp file the remainder of the original. Then move the temp file over the original.