Peeker File


File Class

This class handles the email File data.

Important:  All of these functions are available through the message object parts_array property's file objectreturned by the Peeker class. Notated here as: $part

In order to access a file object you have to get the email message object (the object $e in the other peeker classes), then get that message object's property called parts_array using the $e->get_parts_array() method. You then loop over the parts_array file objects: $parts = $e->get_parts_array();
foreach ($parts as $part)
{
$filename = $part->get_filename()
}

Function Reference

get_filename()

Return the indicated filename of the attached file.

$part->get_filename();

get_string()

Return the fully-decoded string that IS the file.

$part->get_string()

get_encoding()

Return which encoding was used on the attached file.

$part->get_encoding()

get_part_no()

Return the part number for the attached file.

$part->get_part_no();

get_cid()

Return the CID (if any) for the attached file.

$part->get_cid();

get_disposition()

Return the disposition for the attached file.

$part->get_disposition();

get_bytes()

Return the size of the attached file (in bytes).

$part->get_bytes();

get_type()

Return the file type.

$part->get_type();

get_subtype()

Return the file subtype.

$part->get_subtype()

Detectors - All Return TRUE or FALSE

has_cid()

TRUE if the file has a CID which indicates that it is carrying images that expect to be rendered as part of the message display.

$part->has_cid();