在 Google 脚本中检索 Google 驱动器帐户存储配额?

Retrieve Google Drive account storage quota in a Google Script?

谁能给我一个例子,我如何检索 Google Drive 帐户当前使用的存储配额并在 Google 脚本中使用该信息?

从 Apps 脚本中,您可以使用 DriveApp.getStorageLimit() 获取总存储空间 space 并使用 DriveApp.getStorageUsed() 获取已用存储空间 space。

参考文献:

DriveApp | getStorageLimit()

DriveApp | getStorageUsed()