Appending text
#1

Hello,

Is any way to user Fseek to add some at start of file without overwriting all in file?

With file
Quote:

Line1=SecondText
Line2=ThirdText
EndOfFile

I would like to do: "AddLineAtStartOfFile("Line0=FirstText")";
Quote:

Line0=FirstText
Line1=SecondText
Line2=ThirdText
EndOfFile

Any ideas how to do it?

-----

This script only ovewrite all

pawn Код:
new File:fileX = fopen(fname,io_readwrite);
fseek(fileX,0,seek_start);
fwrite(fileX,"Line0=FirstText\n");
fclose(fileX);
Reply
#2

EDIT: A sec
EDIT: fseek should work, let me look through! Sorry !
Reply
#3

So I can do it only manually with rewriting all in file? OK

But what is FSeek used for when it canґt write at start of file?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)