[#BloombergLP-bdls-FilesystemUtil-visitPaths-0f]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdls.adoc[bdls]::xref:BloombergLP/bdls/FilesystemUtil.adoc[FilesystemUtil]::visitPaths
:relfileprefix: ../../../
:mrdocs:

Call `visitor` for each filesystem path matching the specified `pattern`&period;

== Synopses

Declared in `&lt;bdls&lowbar;filesystemutil&period;h&gt;`

Call `visitor` for each filesystem path matching the specified `pattern`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdls/FilesystemUtil/visitPaths-042.adoc[visitPaths](
    char const* pattern,
    xref:bsl/function-0a.adoc[bsl::function&lt;void(char const*)&gt;] const& visitor);
----

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

Call `visitor` for each filesystem path matching the specified `pattern`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class STRING&lowbar;TYPE&gt;
static
int
xref:BloombergLP/bdls/FilesystemUtil/visitPaths-046.adoc[visitPaths](
    STRING&lowbar;TYPE const& pattern,
    xref:bsl/function-0a.adoc[bsl::function&lt;void(char const*)&gt;] const& visitor);
----

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

== Return Value

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

== Parameters

[cols="1,4"]
|===
| Name| Description
| *pattern*
| glob&hyphen;style pattern of paths to visit
| *visitor*
| functor invoked with each matching path
|===


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