public static function factory($jail,
$settings) { return new Local($jail, \Drupal::
service('file_system'
));
} /**
* {@inheritdoc}
*/
protected function copyFileJailed($source,
$destination) { if (@!
copy($source,
$destination)) { throw new FileTransferException('Cannot copy %source to %destination.', 0,
['%source' =>
$source, '%destination' =>
$destination]);
} } /**
* {@inheritdoc}
*/
protected function createDirectoryJailed($directory) { if (!
is_dir($directory) && @!
mkdir($directory, 0777, TRUE
)) { throw new FileTransferException('Cannot create directory %directory.', 0,
['%directory' =>
$directory]);
} }