EXAPUNKS

EXAPUNKS

View Stats:
SEEKing Info About File Prepend
(see what I did there? ;> )

SEEK 9999 positions the file pointer to the end so I can append new data.
I would have thought SEEK -9999 places the file pointer before the first entry so I can prepend new data. Instead, it behaves much like a VOID F on the first item, overwriting it.

I use a workaround that involves using two EXAbots to create a new file, add the prepend entry, and then copy from the old file to the new file. I'm positive there's a much better way to move the pointer before the first entry, but maybe I've overlooked something.
Originally posted by The Renderer:
There is no way to add data in front (or inbetween) entries in a file. A copy to file always overwrites the entry that the "cursor" is at, it never pushes the rest of the entries down.
< >
Showing 1-3 of 3 comments
You didn't overlook anything in regard to file seeking for prepending, -9999 does not point before first entry but to the first entry as you noticed
Originally posted by Raymi:
You didn't overlook anything in regard to file seeking for prepending, -9999 does not point before first entry but to the first entry as you noticed

Drat. Oh well, there's still my workaround that gives me what I want.

Thanks for the reply!.
The author of this thread has indicated that this post answers the original topic.
There is no way to add data in front (or inbetween) entries in a file. A copy to file always overwrites the entry that the "cursor" is at, it never pushes the rest of the entries down.
< >
Showing 1-3 of 3 comments
Per page: 1530 50