Can I get a specific folder size instead of the total size of Google Drive using the Google Drive API?

I am trying to get a specific folder size using the Google Cloud REST API.

I tried the o method with the REST API, but in this method I get Total used bytes and the total available free space for my shared cloud storage.

But I want the total size of a specific folder in the Google Cloud with the API.

So, is there a way to get a specific folder size in the Google Cloud Drive API.

Thanks for your help in advance.

+6
source share
2 answers

While I agree with @pinoyyid's answer, I do not agree with their reasoning.

Just because the file structure is actually flat does not mean that you cannot get the size of the folder.

A great example of what this application does - https://gdrivefoldersize.appspot.com/

NB: Due to the way Google Drive is designed, a file / folder can be in several places, which is more like symlink . Thus, you can get an inaccurate size for a folder and, therefore, an unpredictable total disk size if the file and folder sizes were added separately.

+8
source

No, no, and never will be. You need to understand that files in Drive do not live in a folder. Rather, having a parent folder is just a file attribute.

-1
source

Source: https://habr.com/ru/post/987849/


All Articles