How to get file system free space size in Micropython?
Re: How to get file system free space size in Micropython?
https://docs.micropython.org/en/latest/ ... y/uos.html
>>>import uos
>>> uos.statvfs('/')
(4096, 4096, 348, 329, 329, 0, 0, 0, 0, 255)
so,
4096 * 348 is total space in bytes
4096 * 329 is free space in bytes
used space = total - free
>>>import uos
>>> uos.statvfs('/')
(4096, 4096, 348, 329, 329, 0, 0, 0, 0, 255)
so,
4096 * 348 is total space in bytes
4096 * 329 is free space in bytes
used space = total - free
Re: How to get file system free space size in Micropython?
Thanks.cv007 wrote:https://docs.micropython.org/en/latest/ ... y/uos.html
>>>import uos
>>> uos.statvfs('/')
(4096, 4096, 348, 329, 329, 0, 0, 0, 0, 255)
so,
4096 * 348 is total space in bytes
4096 * 329 is free space in bytes
used space = total - free