cctools
Functions
disk_info.h File Reference

Query disk space properties. More...

#include "int_sizes.h"

Go to the source code of this file.

Functions

int disk_info_get (const char *path, UINT64_T *avail, UINT64_T *total)
 Get the total and available space on a disk.

Detailed Description

Query disk space properties.

Function Documentation

int disk_info_get ( const char *  path,
UINT64_T *  avail,
UINT64_T *  total 
)

Get the total and available space on a disk.

Parameters
pathA filename on the disk to be examined.
availA pointer to an integer that will be filled with the available space in bytes.
totalA pointer to an integer that will be filled with the total space in bytes.
Returns
Greater than or equal to zero on success, less than zero otherwise.