[#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 `&lt;bdls&lowbar;filesystemutil&period;h&gt;`

Load into the specified `result` vector all paths in the filesystem matching the specified `pattern`&period; The &apos;&ast;&apos; character will match any number of characters in a filename&semi; however, this matching will not span a directory separator (e&period;g&period;, &quot;logs&sol;m&ast;&period;txt&quot; will not match &quot;logs&sol;march&sol;001&period;txt&quot;)&period; &apos;?&apos; will match any one character&period; &apos;&ast;&apos; and &apos;?&apos; may be used any number of times in the pattern&period; The special directories &quot;&period;&quot; and &quot;&period;&period;&quot; will not be matched against any pattern&period; Note that any initial contents of `result` will be erased, and that the paths in `result` will not be in any particular guaranteed order&period; Return the number of paths matched on success, and a negative value otherwise&semi; if a negative value is returned, the contents of `&ast;result` are undefined&period; The parameterized `STRING&lowbar;TYPE` must be one of `bsl&colon;&colon;string`, `std&colon;&colon;string`, `std&colon;&colon;pmr&colon;&colon;string` (if supported), `bsl&colon;&colon;string&lowbar;view`, or `bslstl&colon;&colon;StringRef`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdls/FilesystemUtil/findMatchingPaths-065c.adoc[findMatchingPaths](
    xref:bsl/vector-00d.adoc[bsl::vector&lt;bsl::string&gt;]* result,
    char const* pattern);
----

[.small]#xref:BloombergLP/bdls/FilesystemUtil/findMatchingPaths-065c.adoc[_» more&period;&period;&period;_]#

Same as the overload taking `const char &ast;`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdls/FilesystemUtil/findMatchingPaths-0ff.adoc[findMatchingPaths](
    std::pmr::vector&lt;std::pmr::string&gt;* result,
    char const* pattern);
----

[.small]#xref:BloombergLP/bdls/FilesystemUtil/findMatchingPaths-0ff.adoc[_» more&period;&period;&period;_]#

Same as the overload taking `bsl&colon;&colon;vector&lt;bsl&colon;&colon;string&gt; &ast;`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdls/FilesystemUtil/findMatchingPaths-09.adoc[findMatchingPaths](
    std::vector&lt;std::string&gt;* result,
    char const* pattern);
----

[.small]#xref:BloombergLP/bdls/FilesystemUtil/findMatchingPaths-09.adoc[_» more&period;&period;&period;_]#

Same as the overload taking `const char &ast;`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class STRING&lowbar;TYPE&gt;
static
int
xref:BloombergLP/bdls/FilesystemUtil/findMatchingPaths-0e.adoc[findMatchingPaths](
    xref:bsl/vector-00d.adoc[bsl::vector&lt;bsl::string&gt;]* result,
    STRING&lowbar;TYPE const& pattern);
----

[.small]#xref:BloombergLP/bdls/FilesystemUtil/findMatchingPaths-0e.adoc[_» more&period;&period;&period;_]#

Same as the overload taking `const char &ast;`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class STRING&lowbar;TYPE&gt;
static
int
xref:BloombergLP/bdls/FilesystemUtil/findMatchingPaths-0fc.adoc[findMatchingPaths](
    std::pmr::vector&lt;std::pmr::string&gt;* result,
    STRING&lowbar;TYPE const& pattern);
----

[.small]#xref:BloombergLP/bdls/FilesystemUtil/findMatchingPaths-0fc.adoc[_» more&period;&period;&period;_]#

Same as the overload taking `const char &ast;`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class STRING&lowbar;TYPE&gt;
static
int
xref:BloombergLP/bdls/FilesystemUtil/findMatchingPaths-0d.adoc[findMatchingPaths](
    std::vector&lt;std::string&gt;* result,
    STRING&lowbar;TYPE const& pattern);
----

[.small]#xref:BloombergLP/bdls/FilesystemUtil/findMatchingPaths-0d.adoc[_» more&period;&period;&period;_]#


[.small]#Created with https://www.mrdocs.com[MrDocs]#
