Skip to content

Feature Request: Add FileSystem abstraction #9

Description

@AGlass0fMilk

Hi USCRPL,

Thanks for all the work you've done with Mbed-OS!

I have been writing some logging utilities lately and wanted to be able to unit test stuff on my desktop to speed up the process.

My use case involves using Mbed's C++ file system API to take advantage of the mbed::FileHandle polymorphism; Using a mbed::FileHandle allows logging output to by dynamically redirected to non-volatile files or to a serial port or anything else subclassing mbed::FileHandle (eg: mbed::BufferedSerial, etc).

I'm on a time crunch, so I decided to simply write my logging stuff with the C file I/O API. This is already portable because Mbed redirects the C file I/O calls.

I think a nice approach for bench-testing Mbed applications that require realistic file system operations would be to implement an mbed::FileSystem that calls the standard C file I/O functions underneath. This would make Mbed's C++ filesystem API portable (at least to Linux).

I figured I would mention this here because it's the same end-goal: being able to build and bench-test Mbed-OS applications on a PC rather than target hardware.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions