Gumdrop\FileHandler::writeStaticFiles PHP Метод

writeStaticFiles() публичный Метод

public writeStaticFiles ( )
    public function writeStaticFiles()
    {
        foreach ($this->listStaticFiles() as $file) {
            $source = realpath($this->app->getSourceLocation() . DIRECTORY_SEPARATOR . $file);
            $source_pathinfo = pathinfo($source);
            $destination = $this->app->getDestinationLocation() . DIRECTORY_SEPARATOR . $file;
            $destination_pathinfo = pathinfo($destination);
            if (!is_dir($destination_pathinfo['dirname'])) {
                $stats = stat($source_pathinfo['dirname']);
                $mode = octdec('0' . substr(decoct($stats['mode']), -3));
                mkdir($destination_pathinfo['dirname'], $mode, true);
            }
            copy(realpath($this->app->getSourceLocation() . DIRECTORY_SEPARATOR . $file), realpath($this->app->getDestinationLocation()) . DIRECTORY_SEPARATOR . $file);
        }
    }