src/Silex/Framework/Command/AssetsInstallCommand.php
private function _hardCopy($originDir, $targetDir)
    {
        $filesystem = $this->getApplication()->getService('filesystem');

        $filesystem->mkdir($targetDir, 0777);
        // We use a custom iterator to ignore VCS files
        $filesystem->mirror(
            $originDir, $targetDir,
            Finder::create()->ignoreDotFiles(false)->in($originDir)
        );
    }
private function _hardCopy($originDir, $targetDir)
    {
        $filesystem = $this->getApplication()->getService('filesystem');

        $filesystem->mkdir($targetDir, 0777);
        // We use a custom iterator to ignore VCS files
        $filesystem->mirror(
            $originDir, $targetDir,
            Finder::create()->ignoreDotFiles(false)->in($originDir)
        );
    }
Creates a directory hard copy

@param string $originDir Source directory
@param string $targetDir Target directory

@return void