C# Class R.Scheduler.Ftp.FtpLibrary

Implementation of IFtpLibrary using FtpWebRequest and FtpWebResponse classes.
Inheritance: IFtpLibrary
Afficher le fichier Open project: R-Suite/R.Scheduler Class Usage Examples

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
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.

Method Details

Connect() public méthode

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
Résultat void

Dispose() public méthode

Not relevant to this implementation
public Dispose ( ) : void
Résultat void

GetFiles() public méthode

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
Résultat void