PHP midgard_blob method exists
Check if file associated with attachment exists.
bool exists(void);
midgard_blob method exists takes no parameters.
Returns TRUE if file exists, FALSE otherwise.
Example
<?php
try {
$attachment = new midgard_attachment($guid);
} catch (midgard_error_exception $e) {
echo $e->getMessage();
}
try {
$blob = new midgard_blob($attachment);
} catch (midgard_error_exception $e) {
echo $e->getMessage();
}
if($blob->exists())
echo "File exists";
?>
More details about fails can be found in [midgard-core docs][0].
