diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-04-26 10:42:11 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-04-27 21:40:13 -0400 |
commit | 7a0964279fafc9912ed5cc4b82abfb81328f5150 (patch) | |
tree | 2ee8670626a483744736b6128b81daaea2753af3 /src/common/storagedir.c | |
parent | 920475f293a8a69dd846cd06249b4b699857a3d4 (diff) | |
download | tor-7a0964279fafc9912ed5cc4b82abfb81328f5150.tar.gz tor-7a0964279fafc9912ed5cc4b82abfb81328f5150.zip |
Functionality to ensure there is space to add files to cache.
Diffstat (limited to 'src/common/storagedir.c')
-rw-r--r-- | src/common/storagedir.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/common/storagedir.c b/src/common/storagedir.c index 9d3c32e237..309d42db17 100644 --- a/src/common/storagedir.c +++ b/src/common/storagedir.c @@ -530,3 +530,13 @@ storage_dir_remove_all(storage_dir_t *d) return storage_dir_shrink(d, 0, d->max_files); } +/** + * Return the largest number of non-temporary files we're willing to + * store in <b>d</b>. + */ +int +storage_dir_get_max_files(storage_dir_t *d) +{ + return d->max_files; +} + |