kernel/private/classes/clusterfilehandlers/dfsbackends/mysqli.php
private function _copyInner( $srcFilePath, $dstFilePath, $fname, $metaData )
    {
        $this->_delete( $dstFilePath, true, $fname );

        $datatype        = $metaData['datatype'];
        $filePathHash    = md5( $dstFilePath );
        $scope           = $metaData['scope'];
        $contentLength   = $metaData['size'];
        $fileMTime       = $metaData['mtime'];
        $nameTrunk       = self::nameTrunk( $dstFilePath, $scope );

        // Copy file metadata.
        if ( $this->_insertUpdate( $this->dbTable( $dstFilePath ),
                                   array( 'datatype'=> $datatype,
                                          'name' => $dstFilePath,
                                          'name_trunk' => $nameTrunk,
                                          'name_hash' => $filePathHash,
                                          'scope' => $scope,
                                          'size' => $contentLength,
                                          'mtime' => $fileMTime,
                                          'expired' => ($fileMTime < 0) ? 1 : 0 ),
                                   "datatype=VALUES(datatype), scope=VALUES(scope), size=VALUES(size), mtime=VALUES(mtime), expired=VALUES(expired)",
                                   $fname ) === false )
        {
            return $this->_fail( $srcFilePath, "Failed to insert file metadata on copying." );
        }

        // Copy file data.
        if ( !$this->dfsbackend->copyFromDFSToDFS( $srcFilePath, $dstFilePath ) )
        {
            return $this->_fail( $srcFilePath, "Failed to copy DFS://$srcFilePath to DFS://$dstFilePath" );
        }
        return true;
    }
private function _copyInner( $srcFilePath, $dstFilePath, $fname, $metaData )
    {
        $this->_delete( $dstFilePath, true, $fname );

        $datatype        = $metaData['datatype'];
        $filePathHash    = md5( $dstFilePath );
        $scope           = $metaData['scope'];
        $contentLength   = $metaData['size'];
        $fileMTime       = $metaData['mtime'];
        $nameTrunk       = self::nameTrunk( $dstFilePath, $scope );

        // Copy file metadata.
        if ( $this->_insertUpdate( $this->dbTable( $dstFilePath ),
                                   array( 'datatype'=> $datatype,
                                          'name' => $dstFilePath,
                                          'name_trunk' => $nameTrunk,
                                          'name_hash' => $filePathHash,
                                          'scope' => $scope,
                                          'size' => $contentLength,
                                          'mtime' => $fileMTime,
                                          'expired' => ($fileMTime < 0) ? 1 : 0 ),
                                   "datatype=VALUES(datatype), scope=VALUES(scope), size=VALUES(size), mtime=VALUES(mtime), expired=VALUES(expired)",
                                   $fname ) === false )
        {
            return $this->_fail( $srcFilePath, "Failed to insert file metadata on copying." );
        }

        // Copy file data.
        if ( !$this->dfsbackend->copyFromDFSToDFS( $srcFilePath, $dstFilePath ) )
        {
            return $this->_fail( $srcFilePath, "Failed to copy DFS://$srcFilePath to DFS://$dstFilePath" );
        }
        return true;
    }
private function _copyInner ( $ srcFilePath , $ dstFilePath , $ fname , $ metaData ) { $ this -> _delete ( $ dstFilePath , true , $ fname ) ; $ datatype = $ metaData [ 'datatype' ] ; $ filePathHash = md5 ( $ dstFilePath ) ; $ scope = $ metaData [ 'scope' ] ; $ contentLength = $ metaData [ 'size' ] ; $ fileMTime = $ metaData [ 'mtime' ] ; $ nameTrunk = self :: nameTrunk ( $ dstFilePath , $ scope ) ; // Copy file metadata. if ( $ this -> _insertUpdate ( $ this -> dbTable ( $ dstFilePath ) , array ( 'datatype' => $ datatype , 'name' => $ dstFilePath , 'name_trunk' => $ nameTrunk , 'name_hash' => $ filePathHash , 'scope' => $ scope , 'size' => $ contentLength , 'mtime' => $ fileMTime , 'expired' => ( $ fileMTime < 0 ) ? 1 : 0 ) , "datatype=VALUES(datatype), scope=VALUES(scope), size=VALUES(size), mtime=VALUES(mtime), expired=VALUES(expired)" , $ fname ) === false ) { return $ this -> _fail ( $ srcFilePath , "Failed to insert file metadata on copying." ) ; } // Copy file data. if ( ! $ this -> dfsbackend -> copyFromDFSToDFS ( $ srcFilePath , $ dstFilePath ) ) { return $ this -> _fail ( $ srcFilePath , "Failed to copy DFS://$srcFilePath to DFS://$dstFilePath" ) ; } return true ; }
Inner function used by _copy to perform the operation in a transaction

@param string $srcFilePath
@param string $dstFilePath
@param bool   $fname
@param array  $metaData Source file's metadata
@return bool

@see _copy
Inner function used by _copy to perform the operation in a transaction