Table of Contents

Class FtpFolderNameRule

Namespace
FluentFTP.Rules
Assembly
FluentFTP.dll

Only accept folders that have the given name, or exclude folders of a given name.

public class FtpFolderNameRule : FtpRule
Inheritance
FtpFolderNameRule
Inherited Members
Extension Methods

Constructors

FtpFolderNameRule(bool, IList<string>, int)

Only accept folders that have the given name, or exclude folders of a given name.

public FtpFolderNameRule(bool whitelist, IList<string> names, int startSegment = 0)

Parameters

whitelist bool

If true, only folders of the given name are downloaded. If false, folders of the given name are excluded.

names IList<string>

The folder names to match

startSegment int

Which path segment to start checking from. 0 checks root folder onwards. 1 skips root folder.

Fields

CommonBlacklistedFolders

Common folders to blacklist

public static List<string> CommonBlacklistedFolders

Field Value

List<string>

Properties

Names

The folder names to match

public IList<string> Names { get; set; }

Property Value

IList<string>

StartSegment

Which path segment to start checking from

public int StartSegment { get; set; }

Property Value

int

Whitelist

If true, only folders of the given name are uploaded or downloaded. If false, folders of the given name are excluded.

public bool Whitelist { get; set; }

Property Value

bool

Methods

IsAllowed(FtpListItem)

Checks if the folders has the given name, or exclude folders of the given name.

public override bool IsAllowed(FtpListItem item)

Parameters

item FtpListItem

Returns

bool