How to get (used/available/total) disk space with boost or poco?

iuwei picture iuwei · Feb 12, 2012 · Viewed 7.5k times · Source

How to get (used,available,total) disk/directory space with boost or poco? Thanks!

Answer

paul23 picture paul23 · Feb 12, 2012

boost::filesystem::space seems to be what you want.

It returns a space_info object, which is a simple struct containing data (one of it space available to your application, and total free space).