#include <bm_zms.h>
Calculate the available free space in the file system.
- Parameters
-
| fs | Pointer to the file system. |
- Returns
- Number of free bytes. On success, it will be equal to the number of bytes that can still be written to the file system. Calculating the free space is a time-consuming operation, especially on SPI flash. On error, returns negative value of error codes defined in
errno.h.
- Return values
-
| Number | of free bytes (>= 0) on success. |
| -EFAULT | if fs is NULL. |
| -EACCES | if BM_ZMS is still not initialized. |
| -EIO | if there is a memory read/write error. |