visitPaths overloads

Synopses

Declared in <bdls_filesystemutil.h>

Call the specified visitor function object for each path in the filesystem matching the specified pattern. Return the number of paths visited on success, and a negative value otherwise. Note that if visitor deletes files or directories during the search, visitor may subsequently be called with paths which have already been deleted, so must be prepared for this event. Also note that there is no guarantee as to the order in which paths will be visited. See findMatchingPaths for a discussion of how pattern is interpreted. Also note that . and .. are never matched by wild cards. The parameterized STRING_TYPE must be one of bsl::string, std::string, std::pmr::string (if supported), bsl::string_view, or bslstl::StringRef.

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

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.

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

Created with MrDocs