List Specific Files Matching a Filter

I want to list specific files in the root directory or other specified directories. How do I do that? The CMD command equivalent would be something like dir favicon.*

Maybe this can be useful: pattern matching.

Can I search every where with resources or does it look in specific directories?

Excuse me? You mean, recursively…?

I mean root directory of the site. Static directory. Directory x and sub directories. Etc.

I suppose that in your case it would be assets, not static. And sub directories… sure? I see double asterisks in the documentation, but never tried myself.

Wait, I think I know what you’re trying to do. If you want to iterate over favicons, resources.Match should be enough.

It matches /assets only, but note that this is (or can be) a virtual folder composed by many, see “file mounts” in the docs.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.