}
int HashIndex::get_path_contents_by_hash(const vector<string> &path,
- const string *lower_bound,
const ghobject_t *next_object,
set<string> *hash_prefixes,
set<pair<string, ghobject_t> > *objects) {
i != rev_objects.end();
++i) {
string hash_prefix = get_path_str(i->second);
- if (lower_bound && hash_prefix < *lower_bound)
- continue;
if (next_object && i->second < *next_object)
continue;
hash_prefixes->insert(hash_prefix);
i != subdirs.end();
++i) {
string candidate = cur_prefix + *i;
- if (lower_bound && candidate < lower_bound->substr(0, candidate.size()))
- continue;
if (next_object &&
(next_object->is_max() ||
candidate < get_path_str(*next_object).substr(0, candidate.size())))
set<string> hash_prefixes;
set<pair<string, ghobject_t> > objects;
int r = get_path_contents_by_hash(path,
- NULL,
next,
&hash_prefixes,
&objects);
/// Get path contents by hash
int get_path_contents_by_hash(
const vector<string> &path, /// [in] Path to list
- const string *lower_bound, /// [in] list > *lower_bound
const ghobject_t *next_object, /// [in] list > *next_object
set<string> *hash_prefixes, /// [out] prefixes in dir
set<pair<string, ghobject_t> > *objects /// [out] objects