cancel
Showing results for 
Search instead for 
Did you mean: 

How to get size of each directory using FileX

Riya
Associate II

Hi , 

I am using STM32H725 board, I want to get the size of each directories present in my MMC chip.

I am using FileX for file and directory operations on an MMC chip. The chip is accessed via USB MSC

Thank you.

2 REPLIES 2
Saket_Om
ST Employee

Hello @Riya 

FileX does not provide a built-in function specifically for calculating the size of a directory. To achieve this, you need to manually iterate through the directory entries, sum the sizes of all files, and handle any subdirectories recursively. This involves using FileX APIs to navigate the file system and perform the necessary calculations.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
Saket_Om
Riya
Associate II

Could you please any examples ?