Philips Philips
/
LocalFileSystem_with_Rename
Rename LocalFileSystem flash memory files, thanks Doug Wendelboe for the fix
Diff: main.cpp
- Revision:
- 0:07f9467c9d46
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Apr 02 20:01:38 2012 +0000 @@ -0,0 +1,14 @@ + + #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"); + + + } \ No newline at end of file