Cleanup after feature implementation.

This commit is contained in:
Joseph Milazzo 2021-02-04 17:01:37 -06:00
parent 1050fa4e54
commit 10c8ea34fe
19 changed files with 23 additions and 80 deletions

View file

@ -40,8 +40,13 @@ namespace API.Services
reSearchPattern.IsMatch(Path.GetExtension(file)));
}
public string[] GetFiles(string path)
public string[] GetFiles(string path, string searchPatternExpression = "")
{
if (searchPatternExpression != string.Empty)
{
return GetFilesWithCertainExtensions(path, searchPatternExpression).ToArray();
}
return !Directory.Exists(path) ? Array.Empty<string>() : Directory.GetFiles(path);
}