1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-19 12:11:26 +02:00

Merge pull request #237 from enzomaserati/master

Add size to file info
This commit is contained in:
Oliver Vogel
2014-10-12 19:43:57 +02:00

View File

@@ -58,4 +58,21 @@ class File
return $this;
}
/**
* Get file size
*
* @return mixed
*/
public function filesize()
{
$path = $this->basePath();
if (file_exists($path) && is_file($path)) {
return filesize($path);
}
return false;
}
}