0
\$\begingroup\$

I want to use elm-chen FATFS library to delete a file from memory. this link. But I do not see any functions to delete a file. Is there a way to delete a file from FATFS using this library? Thanks

Edit. I found the remove file in the full version library. The limited version does not contain the remove feature.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ See on that page : "Also full featured FAT file system module is available here". Apparently you need that one if you need a full range of file operations. \$\endgroup\$
    – user16324
    Commented Mar 31, 2018 at 19:32

3 Answers 3

2
\$\begingroup\$

In FatFs - Generic FAT Filesystem Module, "Remove" means the same thing as "Delete".

enter image description here

\$\endgroup\$
1
\$\begingroup\$

If you would go up one level you would find this.

It's obvious that the "Petit FAT File System Module" can't create nor delete files. Just do poor edits and simple reads. It's meant for "tiny microcontrollers" apparently.

If you want what you expect then you should follow the link above. It leads to "FatFs - Generic FAT Filesystem Module", it's meant for "small embedded systems" apparently. Which I assume you have.


I wish you good luck in perfecting your googling skills.

\$\endgroup\$
2
  • \$\begingroup\$ @amirmohamadhatami I can lead you to the page, but I can't make you hit "ctrl+f" for "remove". Is your thumb in the middle of your hand? \$\endgroup\$ Commented Mar 31, 2018 at 20:04
  • \$\begingroup\$ Sorry, you are right. \$\endgroup\$ Commented Mar 31, 2018 at 20:07
1
\$\begingroup\$

If you look at the full version of FatFS, it contains the f_unlink function, which will allow you to remove files or directories. You just pass it the filename or folder to remove.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.