Skip to content

Commit 90a8859

Browse files
committed
Merge pull request #50 from QingWei-Li/develop
Update RSFClient.cs
2 parents 0912b6c + 99b8e33 commit 90a8859

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Qiniu/RSF/RSFClient.cs

+4-3
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public RSFClient (string bucketName)
9595
/// <param name='limit'>
9696
/// Limit.
9797
/// </param>
98-
public DumpRet ListPrefix (string bucketName, string prefix="", string markerIn="")
98+
public DumpRet ListPrefix(string bucketName, string prefix = "", string markerIn = "", int limit = 0)
9999
{
100100
string url = Config.RSF_HOST + string.Format ("/list?bucket={0}", bucketName);// + bucketName +
101101
if (!string.IsNullOrEmpty (markerIn)) {
@@ -104,7 +104,8 @@ public DumpRet ListPrefix (string bucketName, string prefix="", string markerIn=
104104
if (!string.IsNullOrEmpty (prefix)) {
105105
url += string.Format ("&prefix={0}", prefix);
106106
}
107-
if (this.limit > 0) {
107+
if (limit > 0)
108+
{
108109
url += string.Format ("&limit={0}", limit);
109110
}
110111
for (int i = 0; i < RETRY_TIME; i++) {
@@ -151,7 +152,7 @@ public List<DumpItem> Next ()
151152
return null;
152153
}
153154
try {
154-
DumpRet ret = ListPrefix (this.bucketName, this.prefix, this.marker);
155+
DumpRet ret = ListPrefix(this.bucketName, this.prefix, this.marker, this.limit);
155156
if (ret.Items.Count == 0) {
156157
end = true;
157158
return null;

0 commit comments

Comments
 (0)