C# Класс R.Scheduler.Ftp.FtpLibrary

Implementation of IFtpLibrary using FtpWebRequest and FtpWebResponse classes.
Наследование: IFtpLibrary
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Connect ( string host, int serverPort, string userName, string password = null ) : void

Only builds Request Uri but does not create physical connection to ftp server.

Dispose ( ) : void

Not relevant to this implementation

GetFiles ( string remotePath, string localDir, string fileExtensions, System.TimeSpan cutOff ) : void

Get all the files with specified fileExtensions no older than cutOff timespan. Matched files are downloaded into localDir

Приватные методы

Метод Описание
GetDirItemsParsed ( IList dirItems ) : IEnumerable

Parse raw output from WebRequestMethods.Ftp.ListDirectoryDetails into DirItemStruct

GetDirectoryItems ( ) : IEnumerable

Get detailed listing of files on ftp server.

GetFile ( string filename, string target ) : void

Get specified file into target file

GuessFileListStyle ( IEnumerable recordList ) : DirItemListStyle

Decide Windows-Style, Unixs-Style or unknown

ParseFileStructFromUnixStyleRecord ( string record ) : DirItemStruct

Parse directory item from Unix-Style record. Not currently supported.

ParseFileStructFromWindowsStyleRecord ( string record ) : DirItemStruct

Parse directory item from Windows-Style record.

Описание методов

Connect() публичный Метод

Only builds Request Uri but does not create physical connection to ftp server.
public Connect ( string host, int serverPort, string userName, string password = null ) : void
host string
serverPort int not in use
userName string
password string
Результат void

Dispose() публичный Метод

Not relevant to this implementation
public Dispose ( ) : void
Результат void

GetFiles() публичный Метод

Get all the files with specified fileExtensions no older than cutOff timespan. Matched files are downloaded into localDir
public GetFiles ( string remotePath, string localDir, string fileExtensions, System.TimeSpan cutOff ) : void
remotePath string
localDir string
fileExtensions string
cutOff System.TimeSpan
Результат void