cctools
|
Query disk space properties. More...
#include "int_sizes.h"
#include <time.h>
Go to the source code of this file.
Functions | |
int | host_disk_info_get (const char *path, UINT64_T *avail, UINT64_T *total) |
Get the total and available space on a disk. More... | |
int | check_disk_space_for_filesize (char *path, INT64_T file_size, UINT64_T disk_avail_threshold) |
Return whether a file will fit in the given directory. More... | |
Query disk space properties.
int host_disk_info_get | ( | const char * | path, |
UINT64_T * | avail, | ||
UINT64_T * | total | ||
) |
Get the total and available space on a disk.
path | A filename on the disk to be examined. |
avail | A pointer to an integer that will be filled with the available space in bytes. |
total | A pointer to an integer that will be filled with the total space in bytes. |
int check_disk_space_for_filesize | ( | char * | path, |
INT64_T | file_size, | ||
UINT64_T | disk_avail_threshold | ||
) |
Return whether a file will fit in the given directory.
path | A filename of the disk to be measured. |
file_size | An integer that describes how large the incoming file is. |
disk_avail_threshold | An unsigned integer that describes the minimum available space to leave. |