[英]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: (1)我可以这样列出文件夹中的文件:
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. (2)上面的代码返回文件夹中的文件列表。
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. 注意:我知道这是一个“平面”文件系统,类似于Amazon S3。 However, both (cloudfiles and S3) provides a way to work with 'folder'.
但是,这两个文件(cloudfiles和S3)都提供了使用“文件夹”的方法。 In S3 is easy.
在S3中很容易。 In cloudfiles (with the .net API) I could not find how to do this.
在cloudfiles中(使用.net API),我找不到如何执行此操作。
Any hint will be highly appreciated. 任何提示将不胜感激。
This has just been fixed with the latest push and closes issue #51 on github github上最新的推送和关闭问题#51已解决了这个问题
Link to downloadable package 链接到可下载的软件包
Hope this helps. 希望这可以帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.