clustering/dfs/ezpostsgresqlbackend.php
public function _purge( $filePath, $onlyExpired = false, $expiry = false, $fname = false )
    {
        if ( $fname )
            $fname .= "::_purge($filePath)";
        else
            $fname = "_purge($filePath)";
        $sql = "DELETE FROM " . $this->dbTable( $filePath ) . " WHERE name_hash=" . $this->_md5( $filePath );
        if ( $expiry !== false )
        {
            $sql .= " AND mtime<" . (int)$expiry;
        }
        elseif ( $onlyExpired )
        {
            $sql .= " AND expired=1";
        }
        if ( !$stmt = $this->_query( $sql, $fname ) )
        {
            $this->_fail( "Purging file metadata for $filePath failed" );
        }
        if ( $stmt->rowCount() == 1 )
        {
            $this->dfsbackend->delete( $filePath );
        }
        return true;
    }
public function _purge( $filePath, $onlyExpired = false, $expiry = false, $fname = false )
    {
        if ( $fname )
            $fname .= "::_purge($filePath)";
        else
            $fname = "_purge($filePath)";
        $sql = "DELETE FROM " . $this->dbTable( $filePath ) . " WHERE name_hash=" . $this->_md5( $filePath );
        if ( $expiry !== false )
        {
            $sql .= " AND mtime<" . (int)$expiry;
        }
        elseif ( $onlyExpired )
        {
            $sql .= " AND expired=1";
        }
        if ( !$stmt = $this->_query( $sql, $fname ) )
        {
            $this->_fail( "Purging file metadata for $filePath failed" );
        }
        if ( $stmt->rowCount() == 1 )
        {
            $this->dfsbackend->delete( $filePath );
        }
        return true;
    }
public function _purge ( $ filePath , $ onlyExpired = false , $ expiry = false , $ fname = false ) { if ( $ fname ) $ fname .= "::_purge($filePath)" ; else $ fname = "_purge($filePath)" ; $ sql = "DELETE FROM " . $ this -> dbTable ( $ filePath ) . " WHERE name_hash=" . $ this -> _md5 ( $ filePath ) ; if ( $ expiry !== false ) { $ sql .= " AND mtime<" . ( int ) $ expiry ; } elseif ( $ onlyExpired ) { $ sql .= " AND expired=1" ; } if ( ! $ stmt = $ this -> _query ( $ sql , $ fname ) ) { $ this -> _fail ( "Purging file metadata for $filePath failed" ) ; } if ( $ stmt -> rowCount ( ) == 1 ) { $ this -> dfsbackend -> delete ( $ filePath ) ; } return true ; }
Purges meta-data and file-data for a file entry
Will only expire a single file. Use _purgeByLike to purge multiple files

@see eZDFSFileHandler::purge
@see _purgeByLike

@param string $filePath Path of the file to purge
@param bool $onlyExpired Only purges expired files
@param bool|int $expiry
@param bool|string $fname Optional caller name for debugging

@return bool
Purges meta - data and file - data for a file entry Will only expire a single file . Use _purgeByLike to purge multiple files