diff options
author | Michael Vogt <mvo@ubuntu.com> | 2015-09-04 23:29:38 +0200 |
---|---|---|
committer | Michael Vogt <mvo@ubuntu.com> | 2015-09-04 23:29:38 +0200 |
commit | 7852873a1347fcab50393b545cc1e6edd65531c8 (patch) | |
tree | 73cfb2912e6676f8a36b6d28c0599175233035cc /ftparchive/byhash.h | |
parent | c7609dd7a418428ffbca4c81a7950c4f53c92450 (diff) |
Add support for writing by-hash dirs in apt-ftparchive
This option is enabled via the APT::FTPArchive::DoByHash switch.
It will also honor the option APT::FTPArchive::By-Hash-Keep that
controls how many previous generation of by-hash files should be
kept (defaults to 3).
Merged from https://github.com/mvo5/apt/tree/feature/apt-ftparchive-by-hash
Diffstat (limited to 'ftparchive/byhash.h')
-rw-r--r-- | ftparchive/byhash.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/ftparchive/byhash.h b/ftparchive/byhash.h new file mode 100644 index 000000000..ce05397ad --- /dev/null +++ b/ftparchive/byhash.h @@ -0,0 +1,23 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +/* ###################################################################### + + ByHash + + ByHash helper functions + + ##################################################################### */ + /*}}}*/ +#ifndef BYHASH_H +#define BYHASH_H + +class HashString; + +// Delete all files in "dir" except for the number specified in "KeepFiles" +// that are the most recent ones +void DeleteAllButMostRecent(std::string dir, int KeepFiles); + +// takes a regular input filename +std::string GenByHashFilename(std::string Input, HashString h); + +#endif |