Declaration
public static IEnumerable<string> ExpandWildcards(
string filenameOrPattern,
bool matchFiles = true,
bool matchDirectories = false,
bool includeSubdirectories = false
)Summary
Given a filename or a pattern containing * or ? wildcards, enumerates all names matching the wildcard.
Parameters
| string | filenameOrPattern |
The filename or pattern to expand. If this doesn't contain any wildcards, it is returned unchanged, even if
the named file/directory does not exist in the file system. The pattern may include an absolute or a relative
path, or contain just a name; the results will be relative iff the pattern was relative, and will contain no
path iff the pattern didn't. |
| bool | matchFiles |
Specifies that the pattern should match existing files. |
| bool | matchDirectories |
Specifies that the pattern should match existing directories. |
| bool | includeSubdirectories |
Indicates that files contained in subdirectories should be included. |