BloombergLP::bdls::FilesystemUtil::visitPaths

Call visitor for each filesystem path matching the specified pattern.

Synopsis

Declared in <bdls_filesystemutil.h>

template<class STRING_TYPE>
static
int
visitPaths(
    STRING_TYPE const& pattern,
    bsl::function<void(char const*)> const& visitor);

Description

Same as the preceding overload, but accept a pattern of the (template parameter) STRING_TYPE, which must be one of bsl::string, std::string, std::pmr::string (if supported), bslstl::StringRef, or bsl::string_view.

Return Value

the number of paths visited on success, and a negative value otherwise

Parameters

NameDescription
patternglob-style pattern of paths to visit
visitorfunctor invoked with each matching path