use Symfony\Component\Filesystem\Filesystem; $fileSystem = new Filesystem(); $fileSystem->copy('source/file.txt', 'destination/file.txt');
use Symfony\Component\Filesystem\Filesystem; $fileSystem = new Filesystem(); $fileSystem->mirror('source', 'destination');The `mirror` method copies the contents of a directory from the source path to the destination path. Symfony\Component\Filesystem is the package library for the Filesystem component.