Wednesday, March 1, 2017

Get the size of a folder without looping through all the files in that folder

I want to get the size of a folder without looping through all the files. The folder is in Amazon S3. my current code is
$files = Storage::allFiles($dir); foreach ($files as $file) { $size+= Storage::size($file); }
I want to avoid the looping is there any way to accomplish this.




via Salini

Advertisement