C# Class LumiSoft.Net.FTP.Client.FTP_Client

Ftp client.
Inheritance: IDisposable
Show file Open project: jeske/StepsDB-alpha Class Usage Examples

Public Methods

Method Description
Authenticate ( string userName, string password ) : void

Authenticates user.

Connect ( string host, int port ) : void

Connects to specified host.

CreateDir ( string dir ) : void

Creates directory.

DeleteDir ( string dir ) : void

Deletes directory.

DeleteFile ( string file ) : void

Deletes specified file or directory.

Disconnect ( ) : void

Disconnects from active host.

Dispose ( ) : void

Clears resources and closes connection if open.

FTP_Client ( ) : System

Default connection.

GetList ( ) : DataSet

Gets directory listing.

ReceiveFile ( string fileName, Stream storeStream ) : void

Recieves specified file from server.

ReceiveFile ( string fileName, string putFileName ) : void

Recieves specified file from server.

RenameDir ( string oldDir, string newDir ) : void

Renames directory.

RenameFile ( string oldFileName, string newFileName ) : void

Renames specified file or directory.

SetCurrentDir ( string dir ) : void

Sets current directory.

StoreFile ( Stream getStream, string fileName ) : void

Stores specified file to server.

StoreFile ( string getFileName ) : void

Stores specified file to server.

Private Methods

Method Description
GetDataConnection ( int portA ) : Socket
ParseDirListing ( string list ) : DataSet

Parses server returned directory listing.

Port ( ) : int
SetTransferMode ( TransferMode mode ) : void

Sets transfer mode.

Method Details

Authenticate() public method

Authenticates user.
public Authenticate ( string userName, string password ) : void
userName string User name.
password string Password.
return void

Connect() public method

Connects to specified host.
public Connect ( string host, int port ) : void
host string Host name.
port int Port.
return void

CreateDir() public method

Creates directory.
public CreateDir ( string dir ) : void
dir string Directory name.
return void

DeleteDir() public method

Deletes directory.
public DeleteDir ( string dir ) : void
dir string Name of directory which to delete.
return void

DeleteFile() public method

Deletes specified file or directory.
public DeleteFile ( string file ) : void
file string File name.
return void

Disconnect() public method

Disconnects from active host.
public Disconnect ( ) : void
return void

Dispose() public method

Clears resources and closes connection if open.
public Dispose ( ) : void
return void

FTP_Client() public method

Default connection.
public FTP_Client ( ) : System
return System

GetList() public method

Gets directory listing.
public GetList ( ) : DataSet
return System.Data.DataSet

ReceiveFile() public method

Recieves specified file from server.
public ReceiveFile ( string fileName, Stream storeStream ) : void
fileName string File name of file which to receive.
storeStream Stream Stream where to store file.
return void

ReceiveFile() public method

Recieves specified file from server.
public ReceiveFile ( string fileName, string putFileName ) : void
fileName string File name of file which to receive.
putFileName string File path+name which to store.
return void

RenameDir() public method

Renames directory.
public RenameDir ( string oldDir, string newDir ) : void
oldDir string Name of directory which to rename.
newDir string New directory name.
return void

RenameFile() public method

Renames specified file or directory.
public RenameFile ( string oldFileName, string newFileName ) : void
oldFileName string File name of file what to rename.
newFileName string New file name.
return void

SetCurrentDir() public method

Sets current directory.
public SetCurrentDir ( string dir ) : void
dir string Directory.
return void

StoreFile() public method

Stores specified file to server.
public StoreFile ( Stream getStream, string fileName ) : void
getStream Stream Stream from where to gets file.
fileName string File name to store in server.
return void

StoreFile() public method

Stores specified file to server.
public StoreFile ( string getFileName ) : void
getFileName string File path+name which to store in server.
return void