Table of Contents

Class FtpListParser

Namespace
FluentFTP.Helpers
Assembly
FluentFTP.dll

Parses a line from a file listing using the first successful parser, or the specified parser. Returns an FtpListItem object representing the parsed line, or null if the line was unable to be parsed.

public class FtpListParser
Inheritance
FtpListParser
Inherited Members
Extension Methods

Constructors

FtpListParser(BaseFtpClient)

Initializes a new instance of the FtpListParser class.

public FtpListParser(BaseFtpClient client)

Parameters

client BaseFtpClient

An existing BaseFtpClient object

Properties

CurrentParser

current parser, or parser set by user

public FtpParser CurrentParser { get; set; }

Property Value

FtpParser

DetectedParser

parser calculated based on system type (SYST command)

public FtpParser DetectedParser { get; set; }

Property Value

FtpParser

ParserConfirmed

if we have detected that the current parser is valid

public bool ParserConfirmed { get; set; }

Property Value

bool

VMSNameHasVersion

Is the version number returned as part of the filename?

Some VMS FTP servers do not permit a file to be deleted unless the filename includes the version number. Note that directories are never returned with the version number.

public static bool VMSNameHasVersion { get; set; }

Property Value

bool

Methods

Init(FtpOperatingSystem, FtpParser)

Try to auto-detect which parser is suitable given a system string.

public void Init(FtpOperatingSystem system, FtpParser forcedParser = FtpParser.Auto)

Parameters

system FtpOperatingSystem
forcedParser FtpParser

ParseSingleLine(string, string, List<FtpCapability>, bool)

Parse raw file from server into a file object, using the currently active parser.

public FtpListItem ParseSingleLine(string path, string file, List<FtpCapability> caps, bool isMachineList)

Parameters

path string
file string
caps List<FtpCapability>
isMachineList bool

Returns

FtpListItem