I have a very simple problem with fx_file_seek. I have to create a file and write contents to the end of the file, at the offset 944704 bytes.
So I create the file, open the file and write something at the beginning, fine.
Then open the file again seek to position 944704 and write, but the data is placed next to the previous written data, why?
It is not possible to use fx_file_seek to 'inflate' a file and write a the end?
Currently using 1.7.0 BSP.
Thank you in advance.
No. It doesn't work that way - from the FileX Users Guide...
The semantics you describe is similar to the Posix (Linux) lseek - if you position to 944704, past the end of the file, it will still write to the end of the end of file (it is is smaller), but reads for the "gap" values will return 0 always. An interesting behavior.