Hi Alex,
Thank you for your help.
But, I failed in making a text file directly on my mbed(F: drive in a Windows PC).
In my code, fopen succeeded! fprintf didn't succeed, and an error message box appeared as like cited below;It reads (translation in Englisg from Japanese),
Message title: Windows - Data loss in delayed writing
Error Message: A part of data for a file \Device\Harddisk1\DP(1)0-0+6\ failed in being stored. Data loss occurred. This error may be happened by Computer Hardware errors or Network connection errors. This file should be saved elsewhere, in a different location.
I've confirmed that the firmware version is 16457.
I will try more following samples in Handbook explaining LocalFileSystem interface. Thank you for your help! I need some more suggestions!
marutsu
Hello!
I tried to make a file(like abc.txt) on mbed which works as the drive F: on my PC(Windows).
Is this an unsupported way of making a file around mbed?
Or, are there any errors in my code (to make a file directly on my mbed)?
I hope someone to let me know how to do it!
Thanks a lot, in advence, for any help!
----------
my trial code is: (these lines are borrowed from a sample making a file on SD Cards)
FILE *fp = fopen("\abc.txt", "w+");
if(fp == NULL) {
error("Could not open file for write\n\r");
}
fprintf(fp, "Hello fun SD Card World!");
fclose(fp);