Class FtpFileNameRegexRule
Only accept files whose names match the given regular expression(s), or exclude files that match.
public class FtpFileNameRegexRule : FtpRule
- Inheritance
-
FtpFileNameRegexRule
- Inherited Members
- Extension Methods
Constructors
FtpFileNameRegexRule(bool, IList<string>)
Only accept items that match one of the supplied regex patterns.
public FtpFileNameRegexRule(bool whitelist, IList<string> regexPatterns)
Parameters
whitelist
boolIf true, only items where one of the supplied regex pattern matches are uploaded or downloaded. If false, items where one of the supplied regex pattern matches are excluded.
regexPatterns
IList<string>The list of regex patterns to match. Only valid patterns are accepted and stored. If none of the patterns are valid, this rule is disabled and passes all objects.
Properties
RegexPatterns
The files names to match
public List<string> RegexPatterns { get; set; }
Property Value
Whitelist
If true, only items where one of the supplied regex pattern matches are uploaded or downloaded. If false, items where one of the supplied regex pattern matches are excluded.
public bool Whitelist { get; set; }
Property Value
Methods
IsAllowed(FtpListItem)
Checks if the FtpListItem Name does match any RegexPattern
public override bool IsAllowed(FtpListItem item)
Parameters
item
FtpListItem