path_disk_size_info.h
Go to the documentation of this file.
/*
Copyright (C) 2022 The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#ifndef CWD_INFO_H
#define CWD_INFO_H
#include "int_sizes.h"
#include "list.h"
#include "hash_table.h"
struct path_disk_size_info {
int complete_measurement;
int64_t last_byte_size_complete;
int64_t last_file_count_complete;
int64_t size_so_far;
int64_t count_so_far;
struct list *current_dirs;
};
int path_disk_size_info_get(const char *path, int64_t *measured_size, int64_t *number_of_files, struct hash_table *exclude_paths);
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);
void path_disk_size_info_delete_state(struct path_disk_size_info *state);
#endif
hash_table.h
A general purpose hash table.
list.h
Robust, reentrant linked list structure.
path_disk_size_info_get_r
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.
path_disk_size_info_get
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.
path_disk_size_info
Definition path_disk_size_info.h:14