kernel/private/classes/webdav/ezwebdavcontentbackend.php
protected function performCopy( $source, $destination, $depth = ezcWebdavRequest::DEPTH_INFINITY )
    {
        switch ( $_SERVER['REQUEST_METHOD'] )
        {
            case 'MOVE':
                // in case performCopy() was called from a MOVE operation,
                // do a real move operation, because the move() function
                // from ezcWebdavSimpleBackend calls performCopy() and
                // performDelete()
                $errors = $this->moveRecursive( $source, $destination, $depth );
                break;

            case 'COPY':
                $errors = $this->copyRecursive( $source, $destination, $depth );
                break;

            default:
                $errors = $this->moveRecursive( $source, $destination, $depth );
                break;
        }

        // Transform errors
        foreach ( $errors as $nr => $error )
        {
            $errors[$nr] = new ezcWebdavErrorResponse(
                ezcWebdavResponse::STATUS_423,
                $error
            );
        }

        // Copy dead properties
        $storage = $this->getPropertyStorage( $source );
        $this->storeProperties( $destination, $storage );

        // Updateable live properties are updated automagically, because they
        // are regenerated on request on base of the file they affect. So there
        // is no reason to keep them "alive".

        return $errors;
    }
protected function performCopy( $source, $destination, $depth = ezcWebdavRequest::DEPTH_INFINITY )
    {
        switch ( $_SERVER['REQUEST_METHOD'] )
        {
            case 'MOVE':
                // in case performCopy() was called from a MOVE operation,
                // do a real move operation, because the move() function
                // from ezcWebdavSimpleBackend calls performCopy() and
                // performDelete()
                $errors = $this->moveRecursive( $source, $destination, $depth );
                break;

            case 'COPY':
                $errors = $this->copyRecursive( $source, $destination, $depth );
                break;

            default:
                $errors = $this->moveRecursive( $source, $destination, $depth );
                break;
        }

        // Transform errors
        foreach ( $errors as $nr => $error )
        {
            $errors[$nr] = new ezcWebdavErrorResponse(
                ezcWebdavResponse::STATUS_423,
                $error
            );
        }

        // Copy dead properties
        $storage = $this->getPropertyStorage( $source );
        $this->storeProperties( $destination, $storage );

        // Updateable live properties are updated automagically, because they
        // are regenerated on request on base of the file they affect. So there
        // is no reason to keep them "alive".

        return $errors;
    }
protected function performCopy ( $ source , $ destination , $ depth = ezcWebdavRequest :: DEPTH_INFINITY ) { switch ( $ _SERVER [ 'REQUEST_METHOD' ] ) { case 'MOVE' : // in case performCopy() was called from a MOVE operation, // do a real move operation, because the move() function // from ezcWebdavSimpleBackend calls performCopy() and // performDelete() $ errors = $ this -> moveRecursive ( $ source , $ destination , $ depth ) ; break ; case 'COPY' : $ errors = $ this -> copyRecursive ( $ source , $ destination , $ depth ) ; break ; default : $ errors = $ this -> moveRecursive ( $ source , $ destination , $ depth ) ; break ; } // Transform errors foreach ( $ errors as $ nr => $ error ) { $ errors [ $ nr ] = new ezcWebdavErrorResponse ( ezcWebdavResponse :: STATUS_423 , $ error ) ; } // Copy dead properties $ storage = $ this -> getPropertyStorage ( $ source ) ; $ this -> storeProperties ( $ destination , $ storage ) ; // Updateable live properties are updated automagically, because they // are regenerated on request on base of the file they affect. So there // is no reason to keep them "alive". return $ errors ; }
Copies resources recursively from one path to another.

Copies the resourced identified by $fromPath recursively to $toPath with
the given $depth, where $depth is one of {@link
ezcWebdavRequest::DEPTH_ZERO}, {@link ezcWebdavRequest::DEPTH_ONE},
{@link ezcWebdavRequest::DEPTH_INFINITY}.

Returns an array with {@link ezcWebdavErrorResponse}s for all subtrees,
where the copy operation failed. Errors for subsequent resources in a
subtree should be ommitted.

If an empty array is return, the operation has been completed
successfully.

In case performCopy() was called from a MOVE operation, do a real move
operation, because the move() function from ezcWebdavSimpleBackend
calls performCopy() and performDelete().

@param string $fromPath
@param string $toPath
@param int $depth
@return array(ezcWebdavErrorResponse)
Copies resources recursively from one path to another .