Search code examples
c++boostpoco-libraries

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


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


Solution

  • 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).