Hi
I'm trying to delete all files with a given file id. Will fds_file_delete()
delete all files with a given file id, or just the first one it finds?
thanks
SDK14
According to the documentation...
ret_code_t fds_file_delete ( uint16_t file_id )
Function for deleting all records in a file.
This function deletes a file, including all its records. Deleted records cannot be located using fds_record_find, fds_record_find_by_key, or fds_record_find_in_file. Additionally, they can no longer be opened using fds_record_open.
Note that deleting records does not free the space they occupy in flash memory. To reclaim flash space used by deleted records, call fds_gc to run garbage collection.
This function is asynchronous. Completion is reported through an event that is sent to the registered event handler function.
Ah I see where my confusion was. I was thinking you could have multiple files with the same FILE_ID just as you can have multiple records with the same REC_ID and FILE_ID, but a file is no more than an organizational scheme (whereas records actually hold information).
Thanks for clarifying!
Ah I see where my confusion was. I was thinking you could have multiple files with the same FILE_ID just as you can have multiple records with the same REC_ID and FILE_ID, but a file is no more than an organizational scheme (whereas records actually hold information).
Thanks for clarifying!