clustering/dfs/ezpostsgresqlbackend.php
function _storeInner( $filePath, $datatype, $scope, $fname )
    {
        // Insert file metadata.
        clearstatcache();
        $fileMTime = filemtime( $filePath );
        $contentLength = filesize( $filePath );
        $filePathHash = md5( $filePath );
        $nameTrunk = self::nameTrunk( $filePath, $scope );

        if ( $this->_insertUpdate( $this->dbTable( $filePath ),
            array( 'datatype' => $datatype,
                   'name' => $filePath,
                   'name_trunk' => $nameTrunk,
                   'name_hash' => $filePathHash,
                   'scope' => $scope,
                   'size' => $contentLength,
                   'mtime' => $fileMTime,
                   'expired' => ( $fileMTime < 0 ) ? 1 : 0 ),
            array( 'datatype', 'scope', 'size', 'mtime', 'expired' ),
            $fname ) === false )
        {
            $this->_fail( "Failed to insert file metadata while storing. Possible race condition" );
        }

        // copy given $filePath to DFS
        if ( !$this->dfsbackend->copyToDFS( $filePath ) )
        {
            $this->_fail( "Failed to copy FS://$filePath to DFS://$filePath" );
        }

        return true;
    }
function _storeInner( $filePath, $datatype, $scope, $fname )
    {
        // Insert file metadata.
        clearstatcache();
        $fileMTime = filemtime( $filePath );
        $contentLength = filesize( $filePath );
        $filePathHash = md5( $filePath );
        $nameTrunk = self::nameTrunk( $filePath, $scope );

        if ( $this->_insertUpdate( $this->dbTable( $filePath ),
            array( 'datatype' => $datatype,
                   'name' => $filePath,
                   'name_trunk' => $nameTrunk,
                   'name_hash' => $filePathHash,
                   'scope' => $scope,
                   'size' => $contentLength,
                   'mtime' => $fileMTime,
                   'expired' => ( $fileMTime < 0 ) ? 1 : 0 ),
            array( 'datatype', 'scope', 'size', 'mtime', 'expired' ),
            $fname ) === false )
        {
            $this->_fail( "Failed to insert file metadata while storing. Possible race condition" );
        }

        // copy given $filePath to DFS
        if ( !$this->dfsbackend->copyToDFS( $filePath ) )
        {
            $this->_fail( "Failed to copy FS://$filePath to DFS://$filePath" );
        }

        return true;
    }
function _storeInner ( $ filePath , $ datatype , $ scope , $ fname ) { // Insert file metadata. clearstatcache ( ) ; $ fileMTime = filemtime ( $ filePath ) ; $ contentLength = filesize ( $ filePath ) ; $ filePathHash = md5 ( $ filePath ) ; $ nameTrunk = self :: nameTrunk ( $ filePath , $ scope ) ; if ( $ this -> _insertUpdate ( $ this -> dbTable ( $ filePath ) , array ( 'datatype' => $ datatype , 'name' => $ filePath , 'name_trunk' => $ nameTrunk , 'name_hash' => $ filePathHash , 'scope' => $ scope , 'size' => $ contentLength , 'mtime' => $ fileMTime , 'expired' => ( $ fileMTime < 0 ) ? 1 : 0 ) , array ( 'datatype' , 'scope' , 'size' , 'mtime' , 'expired' ) , $ fname ) === false ) { $ this -> _fail ( "Failed to insert file metadata while storing. Possible race condition" ) ; } // copy given $filePath to DFS if ( ! $ this -> dfsbackend -> copyToDFS ( $ filePath ) ) { $ this -> _fail ( "Failed to copy FS://$filePath to DFS://$filePath" ) ; } return true ; }
Callback function used to perform the actual file store operation
@param string $filePath
@param string $datatype
@param string $scope
@param string $fname
@see eZDFSFileHandlerMySQLBackend::_store()
@return bool
Callback function used to perform the actual file store operation