Amazon.KinesisTap.Core/Sources/DirectorySource.cs
/// <summary>
/// Determine whether should include the file when there are multiple file filters.
/// If there is only one file filter, the filter is handled by FileSystemWatcher
/// If there are multiple file filters, such as "*.log|*.txt", this function will determine whether the file should be included
/// </summary>
/// <param name="fileName">File Name</param>
/// <returns>Whether the file should be included</returns>
Determine whether should include the file when there are multiple file filters.
If there is only one file filter, the filter is handled by FileSystemWatcher
If there are multiple file filters, such as "*.log|*.txt", this function will determine whether the file should be included
Determine whether should include the file when there are multiple file filters . If there is only one file filter the filter is handled by FileSystemWatcher If there are multiple file filters such as " * . log| * . txt " this function will determine whether the file should be included
private bool ShouldInclude(string fileName)
        {
            if (_fileFilters.Length <= 1) return true;
            foreach(var regex in _fileFilterRegexs)
            {
                if (regex.IsMatch(fileName)) return true;
            }
            return false;
        }
private bool ShouldInclude ( string fileName ) { if ( _fileFilters . Length <= 1 ) return true ; foreach ( var regex in _fileFilterRegexs ) { if ( regex . IsMatch ( fileName ) ) return true ; } return false ; }
Determine whether should include the file when there are multiple file filters.
Determine whether should include the file when there are multiple file filters .
Whether the file should be included
Whether the file should be included
fileName
string
None