You are here

protected function UploadFetcher::deleteFile in Feeds 8.3

Deletes a file.

Parameters

int $file_id: The file id.

string $uuid: The file UUID associated with this file.

See also

file_delete()

1 call to UploadFetcher::deleteFile()
UploadFetcher::onFeedDeleteMultiple in src/Feeds/Fetcher/UploadFetcher.php
A feed is being deleted.

File

src/Feeds/Fetcher/UploadFetcher.php, line 148

Class

UploadFetcher
Defines a file upload fetcher.

Namespace

Drupal\feeds\Feeds\Fetcher

Code

protected function deleteFile($file_id, $uuid) {
  if ($file = $this->fileStorage
    ->load($file_id)) {
    $this->fileUsage
      ->delete($file, 'feeds', $this
      ->pluginType(), $uuid);
  }
}