public function moveInto($targetName, $sourcePath, DAV\INode $sourceNode)
    {
        // We only support FSExt\Directory or FSExt\File objects, so
        // anything else we want to quickly reject.
        if (!$sourceNode instanceof self && !$sourceNode instanceof File) {
            return false;
        }

        // PHP allows us to access protected properties from other objects, as
        // long as they are defined in a class that has a shared inheritance
        // with the current class.
        return rename($sourceNode->path, $this->path.'/'.$targetName);
    }
public function moveInto($targetName, $sourcePath, DAV\INode $sourceNode)
    {
        // We only support FSExt\Directory or FSExt\File objects, so
        // anything else we want to quickly reject.
        if (!$sourceNode instanceof self && !$sourceNode instanceof File) {
            return false;
        }

        // PHP allows us to access protected properties from other objects, as
        // long as they are defined in a class that has a shared inheritance
        // with the current class.
        return rename($sourceNode->path, $this->path.'/'.$targetName);
    }
public function moveInto ( $ targetName , $ sourcePath , DAV \ INode $ sourceNode ) { // We only support FSExt\Directory or FSExt\File objects, so // anything else we want to quickly reject. if ( ! $ sourceNode instanceof self && ! $ sourceNode instanceof File ) { return false ; } // PHP allows us to access protected properties from other objects, as // long as they are defined in a class that has a shared inheritance // with the current class. return rename ( $ sourceNode -> path , $ this -> path . '/' . $ targetName ) ; }
Moves a node into this collection.

It is up to the implementors to:
1. Create the new resource.
2. Remove the old resource.
3. Transfer any properties or other data.

Generally you should make very sure that your collection can easily move
the move.

If you don't, just return false, which will trigger sabre/dav to handle
the move itself. If you return true from this function, the assumption
is that the move was successful.

@param string    $targetName new local file/collection name
@param string    $sourcePath Full path to source node
@param DAV\INode $sourceNode Source node itself

@return bool
Moves a node into this collection .