VersionPress\Utils\FileSystem::copyDir PHP Method

copyDir() public static method

Copies a directory. Uses Symfony's mirror() under the cover.
See also: Symfony\Component\Filesystem\Filesystem::mirror()
public static copyDir ( string $origin, string $target )
$origin string
$target string
    public static function copyDir($origin, $target)
    {
        $fs = new \Symfony\Component\Filesystem\Filesystem();
        $fs->mirror($origin, $target);
    }

Usage Example

Exemplo n.º 1
0
 private function prepareBugReport($bugReportDir, $zipFile)
 {
     FileSystem::mkdir($bugReportDir);
     FileSystem::copyDir(VERSIONPRESS_PLUGIN_DIR . '/log', $bugReportDir . '/log');
     $this->savePhpinfo($bugReportDir);
     $this->saveWordPressSpecificInfo($bugReportDir);
     Zip::zipDirectory($bugReportDir, $zipFile);
 }
All Usage Examples Of VersionPress\Utils\FileSystem::copyDir