namespace WrtDeviceApis {
namespace Filesystem {
-
using namespace Api;
bool NodeFilterMatcher::match(const INodePtr& value,
if (!matchRange(value->getCreated(),
filter->getMinCreated(),
- filter->getMaxCreated())) {
+ filter->getMaxCreated()))
+ {
return false;
}
if (!matchRange(value->getModified(),
filter->getMinModified(),
- filter->getMaxModified())) {
+ filter->getMaxModified()))
+ {
return false;
}
if (!matchRange(value->getSize(),
filter->getMinSize(),
- filter->getMaxSize())) {
+ filter->getMaxSize()))
+ {
return false;
}
}
}
bool NodeFilterMatcher::matchString(const std::string& value,
- const OptionalString& filter)
+ const OptionalString& filter)
{
if (!filter.IsNull()) {
return pcrecpp::RE(*filter).PartialMatch(value);
template<typename Type>
bool NodeFilterMatcher::matchRange(const Type& value,
- const DPL::Optional<Type>& min,
- const DPL::Optional<Type>& max)
+ const DPL::Optional<Type>& min,
+ const DPL::Optional<Type>& max)
{
if ((!min.IsNull() && (value < *min)) ||
- (!max.IsNull() && (value > *max))) {
+ (!max.IsNull() && (value > *max)))
+ {
return false;
}
return true;
}
-
} // Filesystem
} // WrtDeviceApis