flipperzero-rs / flipperzero

Rust on the Flipper Zero
MIT License
518 stars 34 forks source link

feature: filesystem #37

Closed TsarFox closed 1 year ago

TsarFox commented 1 year ago

Hello!

I've been working on some wrappers for the stream and file system APIs. This is still draft-state but I'm opening a MR now to make the effort known and garner some comments on approach.

BLUF: These commits provide an interface reminiscent of std::io for the Flipper Zero file system APIs, enabling application developers to interact with files on e.g., the SD card.

dcoles commented 1 year ago

Hi @TsarFox!

Thanks for putting together this PR. It would be fantastic to have a wrapper around the filesystem APIs.

Sounds like you have the right idea by trying to roughly align with the std::fs and std::io modules.

TsarFox commented 1 year ago

Thank you for the feedback!

Switching over to the file_stream_* API led to the need to cast more, so I'm less certain that this is correct, but I'll try to reason through it in the next couple of days

dcoles commented 1 year ago

No problem. I'll take another look over the code shortly (getting a bit late tonight).

TsarFox commented 1 year ago

@str4d This was edifying -- I really appreciate the thorough review! I'll address the rest of your comments tomorrow