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

Update RSFClient.cs #50

Merged
merged 2 commits into from
May 30, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Qiniu/RSF/RSFClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public RSFClient (string bucketName)
/// <param name='limit'>
/// Limit.
/// </param>
public DumpRet ListPrefix (string bucketName, string prefix="", string markerIn="")
public DumpRet ListPrefix(string bucketName, string prefix = "", string markerIn = "", int limit = 0)
{
string url = Config.RSF_HOST + string.Format ("/list?bucket={0}", bucketName);// + bucketName +
if (!string.IsNullOrEmpty (markerIn)) {
Expand All @@ -104,7 +104,8 @@ public DumpRet ListPrefix (string bucketName, string prefix="", string markerIn=
if (!string.IsNullOrEmpty (prefix)) {
url += string.Format ("&prefix={0}", prefix);
}
if (this.limit > 0) {
if (limit > 0)
{
url += string.Format ("&limit={0}", limit);
}
for (int i = 0; i < RETRY_TIME; i++) {
Expand Down Expand Up @@ -151,7 +152,7 @@ public List<DumpItem> Next ()
return null;
}
try {
DumpRet ret = ListPrefix (this.bucketName, this.prefix, this.marker);
DumpRet ret = ListPrefix(this.bucketName, this.prefix, this.marker, this.limit);
if (ret.Items.Count == 0) {
end = true;
return null;
Expand Down