<?php
try {
\Drupal::service('file_system')->copy($source, $destination, $replace);
\Drupal::service('file_system')->move($source, $destination, $replace);
\Drupal::service('file_system')->delete($path);
\Drupal::service('file_system')->deleteRecursive($path, $callback);
\Drupal::service('file_system')->saveData($data, $destination, $replace);
\Drupal::service('file_system')->prepareDirectory($directory, $options);
\Drupal::service('file_system')->getDestinationFilename($destination, $replace);
\Drupal::service('file_system')->createFilename($basename, $directory);
}
catch (\Drupal\Core\File\Exception\FileException $e) {
}
?>