/** * Copy this Pageimage and any of it's variations to another path * * @param string $path * @return bool True if successful * */ public function copyToPath($path) { if (parent::copyToPath($path)) { foreach ($this->getVariations() as $variation) { if (is_file($variation->filename)) { copy($variation->filename, $path . $variation->basename); if ($this->config->chmodFile) { chmod($path . $variation->basename, octdec($this->config->chmodFile)); } } } return true; } return false; }