LocalFileSystem Hello World

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002  
00003 LocalFileSystem local("local");               // Create the local filesystem under the name "local"
00004  
00005 int main() {
00006     FILE *fp = fopen("/local/out.txt", "w");  // Open "out.txt" on the local file system for writing
00007     fprintf(fp, "Hello World!");
00008     fclose(fp);
00009 }