I have a controller execute() function in which I would like to make a file copy from a directory to another.
In Magento 1.9 I was using :
How to perform that in Magento2?
I tried :
public function __construct(
$this->mediaDirectory = $filesystem->getDirectoryWrite(DirectoryList::MEDIA);
$this->_FileDB = $FileDB;
but no file copied.Thank you for your help