Class FtpListParser
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
BaseFtpClientAn existing BaseFtpClient object
Properties
CurrentParser
current parser, or parser set by user
public FtpParser CurrentParser { get; set; }
Property Value
DetectedParser
parser calculated based on system type (SYST command)
public FtpParser DetectedParser { get; set; }
Property Value
ParserConfirmed
if we have detected that the current parser is valid
public bool ParserConfirmed { get; set; }
Property Value
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
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
FtpOperatingSystemforcedParser
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
stringfile
stringcaps
List<FtpCapability>isMachineList
bool