Molajo\Copy::copySourceToTarget PHP 메소드

copySourceToTarget() 보호된 메소드

Copy Source to Target
부터: 1.0.0
protected copySourceToTarget ( ) : object
리턴 object
    protected function copySourceToTarget()
    {
        foreach ($iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->base_path . $this->source_path, RecursiveDirectoryIterator::SKIP_DOTS), RecursiveIteratorIterator::SELF_FIRST) as $item) {
            if ($item->isDir()) {
                mkdir($this->base_path . $this->target_path . DIRECTORY_SEPARATOR . $iterator->getSubPathName());
            } else {
                copy($item, $this->base_path . $this->target_path . DIRECTORY_SEPARATOR . $iterator->getSubPathName());
            }
        }
    }