cctools
host_disk_info.h
Go to the documentation of this file.
1/*
2Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
3Copyright (C) 2022 The University of Notre Dame
4This software is distributed under the GNU General Public License.
5See the file COPYING for details.
6*/
7
8#ifndef DISK_INFO_H
9#define DISK_INFO_H
10
11#ifdef HAS_SYS_STATFS_H
12#include <sys/statfs.h>
13#endif
14
15#ifdef HAS_SYS_STATVFS_H
16#include <sys/statvfs.h>
17#endif
18
19#ifdef HAS_SYS_VFS_H
20#include <sys/vfs.h>
21#endif
22
23
24#include "int_sizes.h"
25#include <time.h>
26
37int host_disk_info_get(const char *path, UINT64_T * avail, UINT64_T * total);
38
45int check_disk_space_for_filesize(char *path, INT64_T file_size, UINT64_T disk_avail_threshold);
46
47#endif
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.
int host_disk_info_get(const char *path, UINT64_T *avail, UINT64_T *total)
Get the total and available space on a disk.