dm_ftp_delete Function

public function dm_ftp_delete(server, remote_file, debug, error_message, error_curl) result(rc)

Deletes remote file on FTP server.

Delete file dummy.txt on a local FTP server:

integer               :: rc
type(ftp_server_type) :: server

rc = dm_ftp_init()
call dm_ftp_server_set(server, host='localhost', username='user', password='secret', tls=.false.)
rc = dm_ftp_delete(server, 'dummy.txt')
call dm_ftp_shutdown()

The function returns the following error codes:

  • E_COMPILER if C pointers could not be nullified (compiler bug).
  • E_FTP if initialisation or connection failed.
  • E_FTP_AUTH if FTP authentication failed.
  • E_FTP_CONNECT if connection to server could not be established.
  • E_FTP_SSL if SSL/TLS error occured.
  • E_INVALID if arguments or FTP server type attributes are invalid.

Arguments

Type IntentOptional Attributes Name
type(ftp_server_type), intent(inout) :: server

FTP server type.

character(len=*), intent(in) :: remote_file

Path of remote file to delete.

logical, intent(in), optional :: debug

Output debug messages.

character(len=:), intent(out), optional, allocatable :: error_message

Error message.

integer, intent(out), optional :: error_curl

cURL error code.

Return Value integer


Calls

proc~~dm_ftp_delete~~CallsGraph proc~dm_ftp_delete dm_ftp_delete curl_easy_cleanup curl_easy_cleanup proc~dm_ftp_delete->curl_easy_cleanup curl_easy_init curl_easy_init proc~dm_ftp_delete->curl_easy_init curl_easy_perform curl_easy_perform proc~dm_ftp_delete->curl_easy_perform curl_easy_setopt curl_easy_setopt proc~dm_ftp_delete->curl_easy_setopt curl_slist_append curl_slist_append proc~dm_ftp_delete->curl_slist_append curl_slist_free_all curl_slist_free_all proc~dm_ftp_delete->curl_slist_free_all interface~dm_present dm_present proc~dm_ftp_delete->interface~dm_present interface~dm_sec_to_msec dm_sec_to_msec proc~dm_ftp_delete->interface~dm_sec_to_msec proc~dm_ftp_error dm_ftp_error proc~dm_ftp_delete->proc~dm_ftp_error proc~dm_ftp_error_message dm_ftp_error_message proc~dm_ftp_delete->proc~dm_ftp_error_message proc~dm_ftp_url dm_ftp_url proc~dm_ftp_delete->proc~dm_ftp_url proc~dm_is_error dm_is_error proc~dm_ftp_delete->proc~dm_is_error curl_easy_strerror curl_easy_strerror proc~dm_ftp_error_message->curl_easy_strerror proc~dm_ftp_url->interface~dm_present curl_url curl_url proc~dm_ftp_url->curl_url curl_url_cleanup curl_url_cleanup proc~dm_ftp_url->curl_url_cleanup curl_url_get curl_url_get proc~dm_ftp_url->curl_url_get curl_url_set curl_url_set proc~dm_ftp_url->curl_url_set interface~dm_itoa dm_itoa proc~dm_ftp_url->interface~dm_itoa proc~dm_string_is_present dm_string_is_present proc~dm_ftp_url->proc~dm_string_is_present