I have the following piece of code:
foreach (string file in Directory.GetFiles(sourcePath))
{
// whatever
}
That gets files from a specific directory. Would it be possible to match directories using a wildcard? For example:
c:estdi*
would match all files in the directories:
c:estdictionary
c:estdirectory
c:estdig
I saw that you can pass a file filter to the GetFiles method, but that applies to files only, not directory names.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…