java - 投递箱 API : how can I get the amount of remaining free space?

标签 java android dropbox-api

在我看来,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/

相关文章:

java - 什么是 JDBC 中的序数绑定(bind)和命名绑定(bind)

java - 未调用 SOAPMessage.writeTo 时 SOAP 服务调用失败

java - 单元测试循环已运行特定次数

android: Installation Error:Unknown Failure-while running an apk file in 中

java - 在我的应用程序的第二个 Activity 中显示 "Happy birthday null"

android - 如何在 exoplayer 中实现音频可视化工具

javascript - 如何将 dropbox.js 与 OAuth 1 结合使用

java - 我可以使用 NGINX 传递静态 secret (驾驶执照等验证文件)图像吗?

android - 通过设备同步 SQLite 表

objective-c - 更改用户后发生 iOS Dropbox API "not currently support by MPOAuthConnection"