function drupal_ftp_delete_file

cis7 destinations.ftp.inc drupal_ftp_delete_file($filename, &$ftp)
cle7 destinations.ftp.inc drupal_ftp_delete_file($filename, &$ftp)
elmsmedia7 destinations.ftp.inc drupal_ftp_delete_file($filename, &$ftp)
icor7 destinations.ftp.inc drupal_ftp_delete_file($filename, &$ftp)
meedjum_blog7 destinations.ftp.inc drupal_ftp_delete_file($filename, &$ftp)
mooc7 destinations.ftp.inc drupal_ftp_delete_file($filename, &$ftp)

The drupal_ftp_delete_file Function This function attempts to delete a file called $filename from the FTP server.

1 call to drupal_ftp_delete_file()
backup_migrate_destination_ftp::_delete_file in sites/all/modules/ulmus/backup_migrate/includes/destinations.ftp.inc
Delete from the ftp destination.

File

sites/all/modules/ulmus/backup_migrate/includes/destinations.ftp.inc, line 360
Functions to handle the FTP backup destination.

Code

function drupal_ftp_delete_file($filename, &$ftp) {
  // Remove the specified file from the FTP server
  if (!@drupal_ftp_connect($ftp)) {
    return FALSE;
  }

  $delete_result = @ftp_delete($ftp->__conn, $filename);

  if ($delete_result == TRUE) {
    // The file/folder was renamed successfully
    return TRUE;
  }
  else {
    // Couldn't delete the selected file
    _backup_migrate_message('FTP Error: Couldn\'t delete the selected file: @filename', array('@filename' => $filename), 'error');
    return FALSE;
  }
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.