[#BloombergLP-bdls-FilesystemUtil-findMatchingPaths-065e] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdls.adoc[bdls]::xref:BloombergLP/bdls/FilesystemUtil.adoc[FilesystemUtil]::findMatchingPaths :relfileprefix: ../../../ :mrdocs: `findMatchingPaths` overloads == Synopses Declared in `<bdls_filesystemutil.h>` Load into the specified `result` vector all paths in the filesystem matching the specified `pattern`. The '*' character will match any number of characters in a filename; however, this matching will not span a directory separator (e.g., "logs/m*.txt" will not match "logs/march/001.txt"). '?' will match any one character. '*' and '?' may be used any number of times in the pattern. The special directories "." and ".." will not be matched against any pattern. Note that any initial contents of `result` will be erased, and that the paths in `result` will not be in any particular guaranteed order. Return the number of paths matched on success, and a negative value otherwise; if a negative value is returned, the contents of `*result` are undefined. The parameterized `STRING_TYPE` must be one of `bsl::string`, `std::string`, `std::pmr::string` (if supported), `bsl::string_view`, or `bslstl::StringRef`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdls/FilesystemUtil/findMatchingPaths-065c.adoc[findMatchingPaths]( xref:bsl/vector-00d.adoc[bsl::vector<bsl::string>]* result, char const* pattern); ---- [.small]#xref:BloombergLP/bdls/FilesystemUtil/findMatchingPaths-065c.adoc[_» more..._]# Same as the overload taking `const char *`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdls/FilesystemUtil/findMatchingPaths-0ff.adoc[findMatchingPaths]( std::pmr::vector<std::pmr::string>* result, char const* pattern); ---- [.small]#xref:BloombergLP/bdls/FilesystemUtil/findMatchingPaths-0ff.adoc[_» more..._]# Same as the overload taking `bsl::vector<bsl::string> *`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int xref:BloombergLP/bdls/FilesystemUtil/findMatchingPaths-09.adoc[findMatchingPaths]( std::vector<std::string>* result, char const* pattern); ---- [.small]#xref:BloombergLP/bdls/FilesystemUtil/findMatchingPaths-09.adoc[_» more..._]# Same as the overload taking `const char *`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class STRING_TYPE> static int xref:BloombergLP/bdls/FilesystemUtil/findMatchingPaths-0e.adoc[findMatchingPaths]( xref:bsl/vector-00d.adoc[bsl::vector<bsl::string>]* result, STRING_TYPE const& pattern); ---- [.small]#xref:BloombergLP/bdls/FilesystemUtil/findMatchingPaths-0e.adoc[_» more..._]# Same as the overload taking `const char *`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class STRING_TYPE> static int xref:BloombergLP/bdls/FilesystemUtil/findMatchingPaths-0fc.adoc[findMatchingPaths]( std::pmr::vector<std::pmr::string>* result, STRING_TYPE const& pattern); ---- [.small]#xref:BloombergLP/bdls/FilesystemUtil/findMatchingPaths-0fc.adoc[_» more..._]# Same as the overload taking `const char *`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class STRING_TYPE> static int xref:BloombergLP/bdls/FilesystemUtil/findMatchingPaths-0d.adoc[findMatchingPaths]( std::vector<std::string>* result, STRING_TYPE const& pattern); ---- [.small]#xref:BloombergLP/bdls/FilesystemUtil/findMatchingPaths-0d.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#