Source release v3.2.0
This commit is contained in:
@@ -72,7 +72,12 @@ bool TestHost::exists(const std::string& name) {
|
||||
|
||||
bool TestHost::remove(const std::string& name) {
|
||||
LOGD("remove: %s", name.c_str());
|
||||
files_.erase(name);
|
||||
if (name.empty()) {
|
||||
// If no name, delete all files (see DeviceFiles::DeleteAllFiles())
|
||||
files_.clear();
|
||||
} else {
|
||||
files_.erase(name);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -82,6 +87,14 @@ int32_t TestHost::size(const std::string& name) {
|
||||
return it->second.size();
|
||||
}
|
||||
|
||||
bool TestHost::list(std::vector<std::string>* names) {
|
||||
names->clear();
|
||||
for (StorageMap::iterator it = files_.begin(); it != files_.end(); it++) {
|
||||
names->push_back(it->first);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
int64_t TestHost::now() {
|
||||
return now_;
|
||||
}
|
||||
@@ -107,5 +120,5 @@ void TestHost::cancel(IClient* client) {
|
||||
}
|
||||
|
||||
// Now swap the queues.
|
||||
timers_.swap(others);
|
||||
std::swap(timers_, others);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user