As part of the conversion of files to classed entities, changes were made to file_delete().

  • The function now takes a file ID as a parameter
  • The $forced parameter has been removed
  • The function no longer returns a value

Examples

// D7 code
$deleted = file_delete($file, TRUE));

// Backdrop 1.0.0 code
$fid = $file->fid;
file_delete($fid); // No return value

Or alternatively, since the file object is now an entity
$file->delete(); // No return value

Introduced in branch: 
1.0.x
Introduced in version: 
1.0.0
Impacts: 
Module developers
Related Github Issues: 
https://github.com/backdrop/backdrop-issues/issues/652