mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-05-27 10:02:34 -04:00
Cleanup after feature implementation.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user