You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While this library works as advertized.. (Thanks!), may I suggest to add a couple of bool functions which match a glob pattern or a vector of glob patterns against a given std::filesystem::path:
This is useful when one already has a pre-existing recursive filesystem iterator or algorithm.
This is a 'naive' implementation based on the pre-existing fnmatch function:
boolmatch(fs::path name, std::vector<std::string> patterns)
{
for (auto& p : patterns) {
if (glob::fnmatch(name, p)) {
returntrue;
}
}
returnfalse;
}
};
The text was updated successfully, but these errors were encountered:
While this library works as advertized.. (Thanks!), may I suggest to add a couple of bool functions which match a glob pattern or a vector of glob patterns against a given
std::filesystem::path
:This is useful when one already has a pre-existing recursive filesystem iterator or algorithm.
This is a 'naive' implementation based on the pre-existing
fnmatch
function:The text was updated successfully, but these errors were encountered: