簡體   English   中英

Rackspace CloudFiles C#API:如何在根“文件夾”中列出文件,以及如何在“文件夾”中列出(子)文件夾?

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

(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);

但是,這:

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

或這個:

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

不起作用。
如何查詢根文件夾中的文件?

(2)上面的代碼返回文件夾中的文件列表。
如何獲取文件夾中的文件夾列表? 我可以設置任何參數來獲取此列表嗎?
注意:我知道這是一個“平面”文件系統,類似於Amazon S3。 但是,這兩個文件(cloudfiles和S3)都提供了使用“文件夾”的方法。 在S3中很容易。 在cloudfiles中(使用.net API),我找不到如何執行此操作。

任何提示將不勝感激。

github上最新的推送和關閉問題#51已解決了這個問題

鏈接到可下載的軟件包

希望這可以幫助。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM