public function copyTo($dest, $full = true)
    {
        if ($full) {
            if (strpos($this->path, DIRECTORY_SEPARATOR) !== false) {
                $folder = substr($this->path, (strrpos($this->path, DIRECTORY_SEPARATOR) + 1));
            } else {
                $folder = $this->path;
            }

            if (!file_exists($dest . DIRECTORY_SEPARATOR . $folder)) {
                mkdir($dest . DIRECTORY_SEPARATOR . $folder);
            }
            $dest = $dest . DIRECTORY_SEPARATOR . $folder;
        }

        return static::copy($this->path, $dest, true);
    }
public function copyTo($dest, $full = true)
    {
        if ($full) {
            if (strpos($this->path, DIRECTORY_SEPARATOR) !== false) {
                $folder = substr($this->path, (strrpos($this->path, DIRECTORY_SEPARATOR) + 1));
            } else {
                $folder = $this->path;
            }

            if (!file_exists($dest . DIRECTORY_SEPARATOR . $folder)) {
                mkdir($dest . DIRECTORY_SEPARATOR . $folder);
            }
            $dest = $dest . DIRECTORY_SEPARATOR . $folder;
        }

        return static::copy($this->path, $dest, true);
    }
public function copyTo ( $ dest , $ full = true ) { if ( $ full ) { if ( strpos ( $ this -> path , DIRECTORY_SEPARATOR ) !== false ) { $ folder = substr ( $ this -> path , ( strrpos ( $ this -> path , DIRECTORY_SEPARATOR ) + 1 ) ) ; } else { $ folder = $ this -> path ; } if ( ! file_exists ( $ dest . DIRECTORY_SEPARATOR . $ folder ) ) { mkdir ( $ dest . DIRECTORY_SEPARATOR . $ folder ) ; } $ dest = $ dest . DIRECTORY_SEPARATOR . $ folder ; } return static :: copy ( $ this -> path , $ dest , true ) ; }
Copy an entire directory recursively

@param  string  $dest
@param  boolean $full
@return void
Copy an entire directory recursively