Rename LocalFileSystem flash memory files, thanks Doug Wendelboe for the fix

Dependencies:   mbed

main.cpp

Committer:
mbed2f
Date:
2012-04-02
Revision:
0:07f9467c9d46

File content as of revision 0:07f9467c9d46:


 #include "mbed.h"
 #include "rename.h"

 LocalFileSystem local("local");             // Create the local filesystem under the name "local"

 int main() {
 FILE *fp = fopen("/local/Test.txt", "w");  // Open "out.txt" on the local file system for writing
    fprintf(fp, "Hello World!");             
    fclose(fp);                               
     file_rename("/local/Test.txt", "/local/new_name.txt");
    
      
    }