add method getFilesize()

This commit is contained in:
Uwe Steinmann 2016-02-11 17:47:05 +01:00
parent 528e911535
commit 31d02f8114

View File

@ -282,6 +282,21 @@ class SeedDMS_Preview_Previewer {
}
} /* }}} */
public function getFilesize($object, $width=0) { /* {{{ */
if($width == 0)
$width = $this->width;
else
$width = intval($width);
$target = $this->getFileName($object, $width);
if($target && file_exists($target.'.png')) {
return(filesize($target.'.png'));
} else {
return false;
}
} /* }}} */
public function deletePreview($document, $object, $width=0) { /* {{{ */
if($width == 0)
$width = $this->width;