Pushing data in to a file

BlitzPlus Forums/BlitzPlus Programming/Pushing data in to a file

UUICEO(Posted 2007) [#1]
Is there any way I can add information to the beginning of a file without having to rewrite the whole file?


Matty(Posted 2007) [#2]
OpenFile() returns a file handle that allows both reading and writing, and then you use seekfile to go to a specific location within the file.

However I don't know if it is possible (don't think that it is) to 'insert' data into a file so that offset of the rest of the data in the file shifts as well.


UUICEO(Posted 2007) [#3]
Thank you for the Reply. I didn't think it was possible either but I figured I would check to save myself a lot of extra writing.


Abrexxes(Posted 2007) [#4]
With 2 banks you can write your own function like FileInsert(file$,offset,bytes). Thats for 10 minutes to do and you have what you need.

bye