FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  

News:

Welcome to the FTDI Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ FTDI Support


New Bridgetek Community is now open

Please note that we have created the Bridgetek Community to discuss all Bridgetek products e.g. EVE, MCU.

Please follow this link and create a new user account to get started.

Bridgetek Community

Author Topic: Trouble appending data to an existing file  (Read 413 times)

forcetronics

  • Newbie
  • *
  • Posts: 1
    • View Profile
Trouble appending data to an existing file
« on: August 11, 2018, 05:48:39 PM »

Hello,

I am trying to append data or text to an existing file. I am able to open the existing file but I always write over the existing data instead of appending new data to the existing data. See my code below. Do I need to use a function like "f_lseek" to change the writing position of the file? Any help would be appreciated.

Here is how I open the file:
res = f_open(&f, EXAMPLE_FILE, FA_WRITE | FA__WRITTEN | FA_OPEN_EXISTING/*| FA_CREATE_NEW*/);

Here is the function used to write data:
f_write(&f, data, towrite, &written);
Logged

FTDI Community

  • Administrator
  • Full Member
  • *****
  • Posts: 213
    • View Profile
Re: Trouble appending data to an existing file
« Reply #1 on: August 13, 2018, 01:14:04 PM »

Hello,

Can you just clarify which product you are using?

Best Regards,
FTDI Community
Logged