Android Question Getting the size of a directory

Devv

Active Member
Licensed User
Longtime User
How could i get the size of a directory (/sdcard/whatsapp) for example?
 

DonManfred

Expert
Licensed User
Longtime User
Get all files from the folder recursively
Iterate through this list and get the file sizes
The sum of all filesizes is the size of the folder
 
Upvote 0
Top