In drupal 9 you can often get errors like this. You should work the OO way of using classes, or use services.
\Drupal::service('file_system')->delete($fileLocation);
In drupal 9 you can often get errors like this. You should work the OO way of using classes, or use services.
\Drupal::service('file_system')->delete($fileLocation);