Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Looking for a function to retrieve used and free space on SD card prior to write. #93

Open
jimtal001 opened this issue Apr 15, 2024 · 5 comments

Comments

@jimtal001
Copy link

I am storing large files on an SD card using this great library (thank you), but I need to verify that there is enough space remaining before the write and be able to send remote message if storage is low. I have not been able to locate a function in your library to retrieve this info. If it exist, could you show me a simple example?

@carlk3
Copy link
Owner

carlk3 commented Apr 16, 2024

Have a look at

static void run_getfree() {

@jimtal001
Copy link
Author

jimtal001 commented Apr 16, 2024 via email

@carlk3
Copy link
Owner

carlk3 commented Apr 16, 2024

The ls function populates a FILINFO structure:

Also, see f_size.

@jimtal001
Copy link
Author

jimtal001 commented Apr 18, 2024 via email

@carlk3
Copy link
Owner

carlk3 commented Apr 19, 2024

One way would be to simply format the card:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants