public ListPrefix ( string bucketName, string prefix = "", string markerIn = "", int limit ) : Task |
||
bucketName | string | /// Bucket name. /// |
prefix | string | /// Prefix. /// |
markerIn | string | /// Marker in. /// |
limit | int | /// Limit. /// |
리턴 | Task |
public static DumpRet GetUEditorFileUploadToday() { var policy = new PutPolicy(bucket, 3600); RSFClient client = new RSFClient(bucket); var picColl = client.ListPrefix(bucket, "", ""); return picColl; }
public void ListPrefixTest() { RSFClient target = new RSFClient (Bucket); // TODO: 初始化为适当的值 target.Marker = string.Empty; target.Prefix = "csharp"; target.Limit = 3; DumpRet actual; actual = target.ListPrefix (Bucket); foreach (DumpItem item in actual.Items) { Console.WriteLine ("Key:{0},Hash:{1},Mime:{2},PutTime:{3},EndUser:{4}", item.Key, item.Hash, item.Mime, item.PutTime, item.EndUser); } //error params Assert.IsTrue (actual.Items.Count >= 3, "ListPrefixTest Failure"); }
void Bind() { RSFClient rsf = new RSFClient(Runtime.Bucket); rsf.Prefix = this.txtPrefix.Text; DumpRet ret = rsf.ListPrefix(Runtime.Bucket); Dictionary<DateTime, DumpItem> dic = new Dictionary<DateTime, DumpItem>(); foreach(var item in ret.Items) { dic.Add(new DateTime(item.PutTime), item); } List<DumpItem> list = new List<DumpItem>(); var temp = dic.OrderBy(item => item.Key).Reverse().ToList(); foreach(var item in temp) { list.Add(item.Value); } lv.Bind(list); RenderLV(); }
static void Main(string[] args) { while(true) { var current = Console.ReadLine(); //list <bucket> //download <bucket> <key> string[] lineDatas = current.Split(' '); switch(lineDatas[0]) { case "list": RSFClient rsf = new RSFClient(lineDatas[1]); DumpRet ret = rsf.ListPrefix(lineDatas[1]); if(ret!=null) foreach (var item in ret.Items) { } break; } } }
public List<string> getFilesWithPrefix(string prefix) { List<string> filelist = new List<string>(); RSFClient client = new RSFClient(m_qiniuconf.bucketname); DumpRet files = client.ListPrefix(m_qiniuconf.bucketname, prefix); foreach(var i in files.Items) { filelist.Add(i.Key); } return filelist; }