4 years ago.

Local File System not working

I am trying the local file system example I would expect to see a file called out.txt on my MBed. I don't get anything. Can someone help?

  1. include "mbed.h"

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

int main() { FILE *fp = fopen("/local/out.txt", "w"); Open "out.txt" on the local file system for writing

fprintf(fp, "Hello World!");



1 Answer

4 years ago.

I very recently ran into the same issue and temporarily solved it my reverting my mbed-os back to the `mbed_lib_rev137` tag. There was an issue with the LocalFileSystem API recently, which has now apparently been solved here:


I can confirm that switching to the mbed-os-5.5.0 tag for mbed-os also fixes the issue. mbed-os-5.5.0 was released just three hours ago! :)

However, I don't know your development setup so I can't be certain that you are facing the same issue I had.

Hope this helps.

Accepted Answer

thanks very much - that works.

posted by Graham Nicholson 21 Jun 2017