Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I get a specific folder size instead of overall Google Drive size through Google Drive API?

I am trying to get the specific folder size with the Google cloud REST API.

I have tried for "about" method with REST API but in this method I am getting the Total used bytes and total available free space for my overall cloud storage.

But I want a total size of specific folder in google cloud with API.

So, Is there any way to get the specific folder size in google cloud drive API.

Thanks for your help in advance.

like image 979
Jai Avatar asked May 25 '15 07:05

Jai


1 Answers

Whilst I agree with @pinoyyid's answer, I do disagree with their reasoning.

Just because the file structure is effectively flat doesn't mean that you can't derive a folder size.

A lovely example of something that does this is this app -https://gdrivefoldersize.appspot.com/

N.B: Due to the way Google Drive is designed, a file/folder can be in multiple locations, which feels more like symlink. As such, you may get an inaccurate size for a folder and therefore an unrepresentative total size of the drive if the file/folder sizes were all added up separately.

like image 101
Dan Atkinson Avatar answered Sep 28 '22 03:09

Dan Atkinson