*/
function archiver_get_archiver($file) {
// Archivers can only work on local paths
- $filepath = drupal_realpath($file);
+ $filepath = \Drupal::service('file_system')->realpath($file);
if (!is_file($filepath)) {
throw new Exception(t('Archivers can only operate on local files: %file not supported', ['%file' => $file]));
}