You are here

public function DirectoryDestination::deleteTheFile in Backup and Migrate 5.0.x

Do the actual delete for a file.

Parameters

string $id: The id of the file to delete.

Overrides DestinationBase::deleteTheFile

File

src/Core/Destination/DirectoryDestination.php, line 209

Class

DirectoryDestination
@package Drupal\backup_migrate\Core\Destination

Namespace

Drupal\backup_migrate\Core\Destination

Code

public function deleteTheFile($id) {
  if ($file = $this
    ->getFile($id)) {
    if ($file = $this
      ->loadFileForReading($file)) {
      return unlink($file
        ->realpath());
    }
  }
  return FALSE;
}