Class FtpFolderRegexRule
Only accept folders whose names match the given regular expression(s), or exclude folders that match.
public class FtpFolderRegexRule : FtpRule
- Inheritance
-
FtpFolderRegexRule
- Inherited Members
- Extension Methods
Constructors
FtpFolderRegexRule(bool, IList<string>, int)
Only accept items that one of the supplied regex pattern.
public FtpFolderRegexRule(bool whitelist, IList<string> regexPatterns, int startSegment = 0)
Parameters
whitelist
boolIf true, only folders where one of the supplied regex pattern matches are uploaded or downloaded. If false, folders 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.
startSegment
intWhich path segment to start checking from. 0 checks root folder onwards. 1 skips root folder.
Properties
RegexPatterns
The files names to match
public List<string> RegexPatterns { get; set; }
Property Value
StartSegment
Which path segment to start checking from
public int StartSegment { get; set; }
Property Value
Whitelist
If true, only folders where one of the supplied regex pattern matches are uploaded or downloaded. If false, folders 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