public function render()
{
$path = $this->arguments['path'];
if (null === $path) {
$path = $this->renderChildren();
if (null === $path) {
return 0;
}
}
$file = GeneralUtility::getFileAbsFileName($path);
if (false === file_exists($file) || true === is_dir($file)) {
throw new Exception('Cannot determine size of "' . $file . '". File does not exist or is a directory.', 1356953963);
}
$size = filesize($file);
if (false === $size) {
throw new Exception('Cannot determine size of "' . $file . '".', 1356954032);
}
return $size;
}