开发者

Rackspace CloudFiles C# API: How to list files on root 'folder', and how to list (sub)folders within a 'folder'?

(1) I can list the files on a folder this way:

var parameters = new Dictionary<GetListParameters, string>();
parameters.Add(GetListParameters.Path, "folder1/"); // get items from this specific path 
var containerItemList = connection.GetContainerItemList(Settings.ContainerName, parameters);

However, this:

parameters.Add(GetListParameters.Path, "/");

or this:

parameters.Add(GetListParameters.Path, "");

does not work.

How can I query the files on the root folder?

(2) The code above returns the list of files in a folder.

How can I get the list of folders within a folder? I there any parameter I can set to get this list?

Note: I know that this is a 'flat' file system, similar to Amazon S3. However, both (cloudfiles and S3) provides a way to work with 'folder'. In S3 is easy. In cloudfiles (with the .net API) I could 开发者_开发技巧not find how to do this.

Any hint will be highly appreciated.


This has just been fixed with the latest push and closes issue #51 on github

Link to downloadable package

Hope this helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜