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

How to create a directory on Flash by RL_FS?

I need two directories to save some data.One directory save runing log and another save my last program image.
I try to use following code to create ABC directory .but faild.

hFile = fopen("S:\\ABC\\1.txt","w");
if(hFile)   //In herer ,hFile = 0
{
        fclose(hFile);
        fdelete("S:\\ABC\\1.txt");
}


How to create a directory?Who can help me to solve it .
thanks !

Parents
  • Thanks for your replay.
    I found the problem finally.
    First, i wrote "w" in uppercase.so the hFile is invalid.
    Second,SPI Flash base on EFS.
    RL-FlashFS » Embedded File System » Limitations contains the information:
    Directories or folders are not supported.
    File names are preprocessed to remove the path information for non-FAT file systems.
    So i can't create any subdirectory on a SPI file system.

Reply
  • Thanks for your replay.
    I found the problem finally.
    First, i wrote "w" in uppercase.so the hFile is invalid.
    Second,SPI Flash base on EFS.
    RL-FlashFS » Embedded File System » Limitations contains the information:
    Directories or folders are not supported.
    File names are preprocessed to remove the path information for non-FAT file systems.
    So i can't create any subdirectory on a SPI file system.

Children
No data