I am looking for a C# library for getting files or directory from a directory using a complex pattern like the one used in Ant:
dir1/dir2/**/SVN/*–> Matches all files in SVN directories that are located anywhere in the directory tree under dir1/dir2**/test/**–> Matches all files that have a test element in their path, including test as a filename.- …
Do I need to code it myself? extract what I want from NAnt? Or this library exists and my google skill sucks.
Directory.GetFiles(String path, String searchPattern) doesn’t handle directory pattern and NDepend.Helpers.FileDirectoryPath neither (it’s a great library for path manipulation by the way)
Coding it yourself wouldnt be that hard.
Just use a correctly formulated regular expression with System.IO methods to build the full path