This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RL-FlashFS with SD-Card: Work with directories?

If I look at all the f* / fs*-Functions, I wonder about the support of directories / subdirectories in FlashFS.

I know that we can do e.g. fopen ("M:\\Temp_Files\\Dump_file.log","w")
to create a file inside folder "Temp_Files".
I also knwo that we can do e.g. fdelete ("M:\\Working folder\\") /* Delete a folder, if empty. */
to delete a folder.

But how to create a folder?

And how to loop through the file system? - i.e. how to list all current folders? - Then list the content of a subfolder? How to find a file "xxxx.txt", which may be in root but may also be in /aaa/bbb/ccc/xxxx.txt? Does ffind do the job?

Thanks for the infos in advance.
A. Bader

  • Folder is created only when you create a file in a folder then does not exist then folder is created also.
    As a workaround you can create a dummy file in a folder that you want to create and delete the file afterwards this will effectively be a folder creation.

    You have to analyze SD_File main function dir command ("void cmd_dir (char *par)" function in SD_File.c file) does what you want it uses ffind to find next file or folder and displays it.
    You can use ffind to search files in root or in subfolder until you find the file you are looking for.

  • Thank you for the information. I got it to work right now.
    I have some other questions... I will create a new thread for that...