file_delete_multiple(array $fids)
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
\Drupal\file\FileUsage\FileUsageBase::delete()
Related topics
- File interface
- Common file handling functions.
File
- core/includes/file.inc, line 829
- API for handling file uploads and server file management.
Code
1 2 3 | function file_delete_multiple( array $fids ) { entity_delete_multiple( 'file' , $fids ); } |
Please login to continue.