private function updateAssets($file) {
        $modulesAssets = MODULES . $this->view->getModule() . DIRECTORY_SEPARATOR . 'View' .
                DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR;
        $themeAssets = THEMES . engineGet('config', 'defaults', 'theme') .
                DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR;

        if (is_dir($modulesAssets) && is_readable($modulesAssets . $file)) {
            $publicFile = $this->publicAssetsPath . $this->view->getModule() . DIRECTORY_SEPARATOR . $file;

            if (!is_dir($modulesAssets . $file) && (!is_readable($publicFile) || $this->checkOutOfDate($publicFile, $modulesAssets . $file))) {
                if (!is_dir(dirname($publicFile))) {
                    mkdir(dirname($publicFile), 0777, true);
                }
                copy($modulesAssets . $file, $publicFile);
            }
            else if (is_dir($modulesAssets . $file)) {
                Util::copyDir($modulesAssets . $file, $publicFile);
            }
        }
        else if (is_dir($themeAssets) && is_readable($themeAssets . $file)) {
            $publicFile = $this->publicAssetsPath . engineGet('config', 'defaults', 'theme') . DIRECTORY_SEPARATOR . $file;
            if (!is_dir($themeAssets . $file) && (!is_readable($publicFile) || $this->checkOutOfDate($publicFile, $themeAssets . $file))) {
                if (!is_dir(dirname($publicFile))) {
                    mkdir(dirname($publicFile), 0777, true);
                }
                copy($themeAssets . $file, $publicFile);
            }
            else if (is_dir($themeAssets . $file)) {
                Util::copyDir($themeAssets . $file, $publicFile);
            }
        }
        else {
            return false;
        }
        return true;
    }
private function updateAssets($file) {
        $modulesAssets = MODULES . $this->view->getModule() . DIRECTORY_SEPARATOR . 'View' .
                DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR;
        $themeAssets = THEMES . engineGet('config', 'defaults', 'theme') .
                DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR;

        if (is_dir($modulesAssets) && is_readable($modulesAssets . $file)) {
            $publicFile = $this->publicAssetsPath . $this->view->getModule() . DIRECTORY_SEPARATOR . $file;

            if (!is_dir($modulesAssets . $file) && (!is_readable($publicFile) || $this->checkOutOfDate($publicFile, $modulesAssets . $file))) {
                if (!is_dir(dirname($publicFile))) {
                    mkdir(dirname($publicFile), 0777, true);
                }
                copy($modulesAssets . $file, $publicFile);
            }
            else if (is_dir($modulesAssets . $file)) {
                Util::copyDir($modulesAssets . $file, $publicFile);
            }
        }
        else if (is_dir($themeAssets) && is_readable($themeAssets . $file)) {
            $publicFile = $this->publicAssetsPath . engineGet('config', 'defaults', 'theme') . DIRECTORY_SEPARATOR . $file;
            if (!is_dir($themeAssets . $file) && (!is_readable($publicFile) || $this->checkOutOfDate($publicFile, $themeAssets . $file))) {
                if (!is_dir(dirname($publicFile))) {
                    mkdir(dirname($publicFile), 0777, true);
                }
                copy($themeAssets . $file, $publicFile);
            }
            else if (is_dir($themeAssets . $file)) {
                Util::copyDir($themeAssets . $file, $publicFile);
            }
        }
        else {
            return false;
        }
        return true;
    }
private function updateAssets ( $ file ) { $ modulesAssets = MODULES . $ this -> view -> getModule ( ) . DIRECTORY_SEPARATOR . 'View' . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR ; $ themeAssets = THEMES . engineGet ( 'config' , 'defaults' , 'theme' ) . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR ; if ( is_dir ( $ modulesAssets ) && is_readable ( $ modulesAssets . $ file ) ) { $ publicFile = $ this -> publicAssetsPath . $ this -> view -> getModule ( ) . DIRECTORY_SEPARATOR . $ file ; if ( ! is_dir ( $ modulesAssets . $ file ) && ( ! is_readable ( $ publicFile ) || $ this -> checkOutOfDate ( $ publicFile , $ modulesAssets . $ file ) ) ) { if ( ! is_dir ( dirname ( $ publicFile ) ) ) { mkdir ( dirname ( $ publicFile ) , 0777 , true ) ; } copy ( $ modulesAssets . $ file , $ publicFile ) ; } else if ( is_dir ( $ modulesAssets . $ file ) ) { Util :: copyDir ( $ modulesAssets . $ file , $ publicFile ) ; } } else if ( is_dir ( $ themeAssets ) && is_readable ( $ themeAssets . $ file ) ) { $ publicFile = $ this -> publicAssetsPath . engineGet ( 'config' , 'defaults' , 'theme' ) . DIRECTORY_SEPARATOR . $ file ; if ( ! is_dir ( $ themeAssets . $ file ) && ( ! is_readable ( $ publicFile ) || $ this -> checkOutOfDate ( $ publicFile , $ themeAssets . $ file ) ) ) { if ( ! is_dir ( dirname ( $ publicFile ) ) ) { mkdir ( dirname ( $ publicFile ) , 0777 , true ) ; } copy ( $ themeAssets . $ file , $ publicFile ) ; } else if ( is_dir ( $ themeAssets . $ file ) ) { Util :: copyDir ( $ themeAssets . $ file , $ publicFile ) ; } } else { return false ; } return true ; }
updates the cached asset files
@todo don't overwrite existing assets unless they are changed (both original && copied)
updates the cached asset files