#include "int_sizes.h"
#include <time.h>
Go to the source code of this file.
Query disk space properties.
◆ host_disk_info_get()
int host_disk_info_get |
( |
const char * |
path, |
|
|
UINT64_T * |
avail, |
|
|
UINT64_T * |
total |
|
) |
| |
Get the total and available space on a disk.
- Parameters
-
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. |
- Returns
- Greater than or equal to zero on success, less than zero otherwise.
◆ check_disk_space_for_filesize()
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.
- Parameters
-
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. |
- Returns
- 0 if the file will not fit, 1 if the file fits.