µTasker Forum

µTasker Forum => NXPTM M522XX, KINETIS and i.MX RT => Topic started by: neil on November 26, 2010, 07:51:37 PM

Title: uFileSystem read/write
Post by: neil on November 26, 2010, 07:51:37 PM
Hi Mark,
  I would like to read/write to the uFileSystem using atmel exernal memory, is it possible to overwrite parts of the file?

Thanks
Neil
Title: Re: uFileSystem read/write
Post by: mark on November 26, 2010, 09:07:10 PM
Hi Neil

The uFileSystem interface doesn't allow overwriting parts of a file. It is necessary to write the complete file again with the changes (this first automatically deleted the file before writing the new content). If you have space, you can use two files - write the new contant to the second file and then deleted the original one (reversing the sequence each time) - this ensures that you can't lose content of there is a crash or power-cycle during the process.

Regards

Mark