$object->stat

Name

$object->stat -- Gives information about an attachment

Synopsis

array $object->stat(void);

Description

Minimum version: Midgard 1.4 (Bifrost)

Gathers the statistics of the attachment.

Returns an array with the following information: device, inode, inode protection mode, number of links, user id of owner, group id owner, [device type if inode device, ]size in bytes, time of last access, time of last modification, time of last change, [blocksize for filesystem I/O,] and number of blocks allocated, if successfull. Returns false on failure.

Method available for: attachment records.

Example

<?php
  $attachment = mgd_get_attachment(1); # attachment with id 1 must exist.
  if($stat     = $attachment->stat()) 
    echo "Size of attachment is" . $stat[7] . "bytes";
?>