Page 1 of 1

Esp32S3 : VFS Component. How to determine Freemem and Used mem on a FileSystem ?

Posted: Thu Jun 27, 2024 12:43 pm
by ThomasESP32
Good afternoon,

I am working on a firmware running on an Esp32S3.
I have 3 partitions that are "referenced" using Virtual FileSystem component and a FileSystem is mounted on each partition.

Using VFS, is there a way to determine the amount of free memory (In bytes) and the amount of used memory (In bytes)
available on each FileSystem ?

Thank you for your help,
Best regards,

Thomas TRUILHE

Re: Esp32S3 : VFS Component. How to determine Freemem and Used mem on a FileSystem ?

Posted: Fri Jun 28, 2024 1:28 am
by ESP_Sprite
For reference, on other Posix OSses, you'd do it by running stat() on the directory where the filesystem is mounted. Potentially newlib has the same convention.