SyntaxFix
Write A Post
Hire A Developer
Questions
You can use Directory.GetFiles to replace your method.
Directory.GetFiles(dirPath, "*", SearchOption.AllDirectories)