Hi,
I am using NffsFile file to write in file in nRF52832 Bluefruit. But its not append text in the file. I am using below code for write in file:
char content1[] = "Test Message MIT |";
Serial.println(content1);
if ( file.open(FILENAME_USERS, FS_ACCESS_WRITE) )
{
Serial.println("OK");
file.write(content1, strlen(content1));
file.close();
}
and using below code for read from file:
if ( file.open(FILENAME_USERS, FS_ACCESS_READ) )
{
Serial.println("READ FILE");
uint32_t readlen;
char buffer[64] = { 0 };
readlen = file.read(buffer, sizeof(buffer));
buffer[readlen] = 0;
Serial.println(buffer);
file.close();
}
So this code is not writing to file. So please can anyone suggest where is I am doing mistake in this code. This code was working fine previously.
Please also suggest how can I remove file from device?
Thanks in advance.