Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usage只能获取整个服务用量, 不能获取具体目录下用量 #49

Open
railgun20001 opened this issue Jul 19, 2018 · 3 comments

Comments

@railgun20001
Copy link

$res = $upyun->usage('/');
$res = $upyun->usage('/test/test');

得到的结果是一样的

@binbinah
Copy link
Member

@railgun20001 SDK 是基于又拍云的 REST_API 开发的. 目前只有一个统计整个服务使用量的接口, 没有提供直接统计某个目录的接口的.

实现这个得多写点代码统计一下. 比如调用 获取文件列表 这个接口, 会返回一个文件大小的数据。遍历某个目录, 然后把这个目录下面每个文件的大小相加一下。

有个现成的 Python 脚本, 遍历的方式统计某个目录的大小: Python 统计目录大小

@sabakugaara
Copy link
Contributor

@binbinah 暂时还是没有获取目录大小的接口是吧?

@binbinah
Copy link
Member

binbinah commented Sep 9, 2019

@binbinah 暂时还是没有获取目录大小的接口是吧?

嗯,还没有这样的接口

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants