src/filesystem/Directory.php
public function getSize() : int
    {
        $files = $this->getFiles();
        $size = 0;
        foreach($files as $file) {
            $size += $file->getSize();
        }
        return $size;
    }
public function getSize() : int
    {
        $files = $this->getFiles();
        $size = 0;
        foreach($files as $file) {
            $size += $file->getSize();
        }
        return $size;
    }
public function getSize ( ) : int { $ files = $ this -> getFiles ( ) ; $ size = 0 ; foreach ( $ files as $ file ) { $ size += $ file -> getSize ( ) ; } return $ size ; }
Recursively get the size of all contents in the directory.

@return integer
@throws FileNotFoundException
@throws FilesystemException
@throws \ntentan\utils\exceptions\FileNotReadableException
Recursively get the size of all contents in the directory .