cctools
path_disk_size_info.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2022 The University of Notre Dame
3 This software is distributed under the GNU General Public License.
4 See the file COPYING for details.
5 */
6 
7 #ifndef CWD_INFO_H
8 #define CWD_INFO_H
9 
10 #include "int_sizes.h"
11 #include "list.h"
12 #include "hash_table.h"
13 
15  int complete_measurement;
16  int64_t last_byte_size_complete;
17  int64_t last_file_count_complete;
18 
19  int64_t size_so_far;
20  int64_t count_so_far;
21 
22  struct list *current_dirs;
23 };
24 
36 int path_disk_size_info_get(const char *path, int64_t *measured_size, int64_t *number_of_files, struct hash_table *exclude_paths);
37 
48 int path_disk_size_info_get_r(const char *path, int64_t max_secs, struct path_disk_size_info **state, struct hash_table *exclude_paths);
49 
50 
51 void path_disk_size_info_delete_state(struct path_disk_size_info *state);
52 
53 #endif
A general purpose hash table.
Robust, reentrant linked list structure.
int path_disk_size_info_get_r(const char *path, int64_t max_secs, struct path_disk_size_info **state, struct hash_table *exclude_paths)
Get a (perhaps partial) disk usage on path, but measure by max_secs at a time.
int path_disk_size_info_get(const char *path, int64_t *measured_size, int64_t *number_of_files, struct hash_table *exclude_paths)
Get the total disk usage on path.
Definition: path_disk_size_info.h:14