This method deletes the file on the FTP server with specified URI.
[Visual Basic] Public Function DeleteFile(ByVal
remoteAddress As String) As Boolean
[C#] public bool DeleteFile(string
remoteAddress);
Parameters
- remoteAddress
- URI
Return Value
Returns True if successful. Returns False if unsuccessful.
Explanation
The DeleteFile method deletes the file on the FTP server with specified URI.
This method is effective for the FTP protocol.
Example
[Visual Basic.NET] Dim _ftp As New Newtone.ImageKit.WPF.Ftp Dim Ret As Boolean 'Username and password _ftp.Credentials = New NetworkCredential("user", "password") 'Deletes the file Ret = _ftp.DeleteFile("ftp://www.newtone.co.jp/test/test.jpg") [Visual C#.NET] Newtone.ImageKit.WPF.Ftp _ftp = new Newtone.ImageKit.WPF.Ftp(); bool Ret; //Username and password _ftp.Credentials = new NetworkCredential("user", "password"); //Deletes the file Ret = _ftp.DeleteFile("ftp://www.newtone.co.jp/test/test.jpg");