#include
// Initialise libfat
fatInitDefault();
// Open a file for reading
FILE *file = fopen("myfile.txt","wrb");
char buffer[] = {"This is a test\n"};
fwrite(buffer, 1, sizeof(buffer), file);
fclose(file);
File will be saved in the application directory (current directory) on sdcard.
So /apps/test/myfile.txt
Awesome and pretty.
No comments:
Post a Comment