Merge pull request #13691 from NooNameR/noonamer/add_pattern_search

Add ability to provide search pattern to GetFiles
This commit is contained in:
Bond-009
2025-03-24 14:15:42 +01:00
committed by GitHub
2 changed files with 48 additions and 6 deletions

View File

@@ -157,8 +157,36 @@ namespace MediaBrowser.Model.IO
/// <returns>All found files.</returns>
IEnumerable<FileSystemMetadata> GetFiles(string path, bool recursive = false);
/// <summary>
/// Gets the files.
/// </summary>
/// <param name="path">The path in which to search.</param>
/// <param name="searchPattern">The search string to match against the names of files. This parameter can contain a combination of valid literal path and wildcard (* and ?) characters, but it doesn't support regular expressions.</param>
/// <param name="recursive">If set to <c>true</c> also searches in subdirectories.</param>
/// <returns>All found files.</returns>
IEnumerable<FileSystemMetadata> GetFiles(string path, string searchPattern, bool recursive = false);
/// <summary>
/// Gets the files.
/// </summary>
/// <param name="path">The path in which to search.</param>
/// <param name="extensions">The file extensions to search for.</param>
/// <param name="enableCaseSensitiveExtensions">Enable case-sensitive check for extensions.</param>
/// <param name="recursive">If set to <c>true</c> also searches in subdirectories.</param>
/// <returns>All found files.</returns>
IEnumerable<FileSystemMetadata> GetFiles(string path, IReadOnlyList<string>? extensions, bool enableCaseSensitiveExtensions, bool recursive);
/// <summary>
/// Gets the files.
/// </summary>
/// <param name="path">The path in which to search.</param>
/// <param name="searchPattern">The search string to match against the names of files. This parameter can contain a combination of valid literal path and wildcard (* and ?) characters, but it doesn't support regular expressions.</param>
/// <param name="extensions">The file extensions to search for.</param>
/// <param name="enableCaseSensitiveExtensions">Enable case-sensitive check for extensions.</param>
/// <param name="recursive">If set to <c>true</c> also searches in subdirectories.</param>
/// <returns>All found files.</returns>
IEnumerable<FileSystemMetadata> GetFiles(string path, string searchPattern, IReadOnlyList<string>? extensions, bool enableCaseSensitiveExtensions, bool recursive);
/// <summary>
/// Gets the file system entries.
/// </summary>