public function vfsStreamDirectory::sizeSummarized in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamDirectory.php \org\bovigo\vfs\vfsStreamDirectory::sizeSummarized()
returns summarized size of directory and its children
Return value
int
File
- vendor/
mikey179/ vfsStream/ src/ main/ php/ org/ bovigo/ vfs/ vfsStreamDirectory.php, line 71
Class
- vfsStreamDirectory
- Directory container.
Namespace
org\bovigo\vfsCode
public function sizeSummarized() {
$size = 0;
foreach ($this->children as $child) {
if ($child
->getType() === vfsStreamContent::TYPE_DIR) {
$size += $child
->sizeSummarized();
}
else {
$size += $child
->size();
}
}
return $size;
}