Make easier to search files in a certain directory
- Dominant language
- C#
- Stars
- 4.2k
- Forks
- 778
- Avg merge
- 3h 37m
- Merged PRs (30d)
- 21
Description
I often find myself in the situation of looking for files matching a certain pattern within a folder or below.
Here is a typical use case
As of today, executing `dotnet test` on a solution will try to find and execute tests on every project filling the log with errors because no testable project was found. This is why I prefer to find every project file within the `tests` directory hive.
```csharp
Task("Test")
.IsDependentOn("Build")
.Does(() =>
{
var testProjects = FindFilesInDirectory(testDirectory, "*.csproj", SearchScope.Recursive);
foreach (var project in testProjects)
{
DotNetCoreTest(project.FullPath);
}
});
```
I am aware that the same functionality is offered by `IFileSystem` but the result of `IFileSystem.GetFiles` is a list of `IFile` instead of `FilePath`. This is not convenient since most of the aliases work with `FilePath`.
Contributor guide
Assessment
This issue has not been assessed yet.