You are here

function file_delete_multiple in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/includes/file.inc \file_delete_multiple()

Deletes files.

Instead of directly deleting a file, it is strongly recommended to delete file usages instead. That will automatically mark the file as temporary and remove it during cleanup.

Parameters

$fid: The file id.

See also

file_unmanaged_delete()

\Drupal\file\FileUsage\FileUsageBase::delete()

Related topics

1 call to file_delete_multiple()
file_delete in core/includes/file.inc
Deletes a file and its database record.

File

core/includes/file.inc, line 761
API for handling file uploads and server file management.

Code

function file_delete_multiple(array $fids) {
  entity_delete_multiple('file', $fids);
}