Prado\Web\TAssetManager::copyDirectory PHP Method

copyDirectory() public method

If the destination directory does not exist, it will be created. File modification time is used to ensure the copied files are latest.
public copyDirectory ( $src, $dst )
    public function copyDirectory($src, $dst)
    {
        if (!is_dir($dst)) {
            @mkdir($dst);
            @chmod($dst, PRADO_CHMOD);
        }
        if ($folder = @opendir($src)) {
            while ($file = @readdir($folder)) {
                if ($file === '.' || $file === '..' || $file === '.svn') {
                    continue;
                } else {
                    if (is_file($src . DIRECTORY_SEPARATOR . $file)) {
                        if (@filemtime($dst . DIRECTORY_SEPARATOR . $file) < @filemtime($src . DIRECTORY_SEPARATOR . $file)) {
                            @copy($src . DIRECTORY_SEPARATOR . $file, $dst . DIRECTORY_SEPARATOR . $file);
                            @chmod($dst . DIRECTORY_SEPARATOR . $file, PRADO_CHMOD);
                        }
                    } else {
                        $this->copyDirectory($src . DIRECTORY_SEPARATOR . $file, $dst . DIRECTORY_SEPARATOR . $file);
                    }
                }
            }
            closedir($folder);
        } else {
            throw new TInvalidDataValueException('assetmanager_source_directory_invalid', $src);
        }
    }