在我看来,Dropbox API 无法判断链接的 Dropbox 帐户的剩余可用空间。我只能通过调用 .accountInfo() 来获取用户的总配额。
我看到的唯一方法是遍历用户存储在 Dropbox 中的所有文件,并求和它们的大小,然后从总配额中减去这个数量。这个解决方案看起来很糟糕而且很慢,有没有更好的方法?
作为旁注,我尝试在 Android 上执行此操作,但我认为这不是一个依赖于平台的问题。
最佳答案
documentation for the /account/info call状态:
quota_info/normal The user's used quota outside of shared folders (bytes).
quota_info/shared The user's used quota in shared folders (bytes).
quota_info/quota The user's total quota allocation (bytes).
因此,可用空间应该是:
quota - normal - shared
关于java - 投递箱 API : how can I get the amount of remaining free space?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14853410/