This method deletes the file on the FTP server with specified host name, path name and port number.

[Visual Basic] Public Function DeleteFile(ByVal remoteHost As String, ByVal remotePath As String, ByVal remotePort As Integer) As Boolean
[C#] public bool DeleteFile(string remoteHost, string remotePath, int remotePort);

Parameters

remoteHost
Domain name in DNS style, or IP address
remotePath
The name of the remote path
remotePort
IP port number

Return Value

Returns True if successful. Returns False if unsuccessful.

Explanation

The DeleteFile method deletes the file on the FTP server with specified host name, path name and port number.

This method is effective for the FTP protocol.

Example

[Visual Basic.NET] Dim _ftp As
New Newtone.ImageKit.Ftp Dim Ret
As Boolean 'Username and
password _ftp.Credentials = New NetworkCredential("user",
"password") 'Deletes the
file Ret = _ftp.DeleteFile("www.newtone.co.jp", "test/test.jpg",

21) [Visual
C#.NET] Newtone.ImageKit.Ftp _ftp = new
Newtone.ImageKit.Ftp(); bool
Ret; //Username and password
_ftp.Credentials = new NetworkCredential("user", "password");
//Deletes the file
Ret = _ftp.DeleteFile("www.newtone.co.jp", "test/test.jpg", 21);

See Also

Ftp Class | Ftp Members


The ImageKit.NET3 is created by Newtone Corporation