cctools
host_disk_info.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
3 Copyright (C) 2005- The University of Notre Dame
4 This software is distributed under the GNU General Public License.
5 See 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 
37 int host_disk_info_get(const char *path, UINT64_T * avail, UINT64_T * total);
38 
45 int check_disk_space_for_filesize(char *path, INT64_T file_size, UINT64_T disk_avail_threshold);
46 
47 #endif
int host_disk_info_get(const char *path, UINT64_T *avail, UINT64_T *total)
Get the total and available space on a disk.
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.