src/Codeception/Module/WPDb.php
public function grabAttachmentAttachedFile($attachmentPostId)
    {
        $attachedFile = $this->grabFromDatabase(
            $this->grabPostmetaTableName(),
            'meta_value',
            ['meta_key' => '_wp_attached_file', 'post_id' => $attachmentPostId]
        );

        return (string)$attachedFile;
    }
public function grabAttachmentAttachedFile($attachmentPostId)
    {
        $attachedFile = $this->grabFromDatabase(
            $this->grabPostmetaTableName(),
            'meta_value',
            ['meta_key' => '_wp_attached_file', 'post_id' => $attachmentPostId]
        );

        return (string)$attachedFile;
    }
public function grabAttachmentAttachedFile ( $ attachmentPostId ) { $ attachedFile = $ this -> grabFromDatabase ( $ this -> grabPostmetaTableName ( ) , 'meta_value' , [ 'meta_key' => '_wp_attached_file' , 'post_id' => $ attachmentPostId ] ) ; return ( string ) $ attachedFile ; }
Returns the path, as stored in the database, of an attachment `_wp_attached_file` meta.
The attached file is, usually, an attachment origal file.

@example
```php
$file = $I->grabAttachmentAttachedFile($attachmentId);
$fileInfo = new SplFileInfo($file);
$I->assertEquals('jpg', $fileInfo->getExtension());
```

@param int $attachmentPostId The attachment post ID.

@return string The attachment attached file path or an empt string if not set.
Returns the path as stored in the database of an attachment _wp_attached_file meta . The attached file is usually an attachment origal file .