OneDrive core concepts (이전의 SkyDrive)에 따르면 파일을 최상위 디렉토리 또는 특정 폴더에 나열하는 두 가지 옵션이 있습니다. 당신이 발견, 당신은 당신이 데이터 키에서 모든 파일을 나열 할 수 있습니다 GetCompleted
경우에 예를
liveClient.GetAsync(folder.Id + "/files");
를 들어,
liveClient.GetAsync("me/skydrive/files");
하고 folderId + "/files"
사용하는 특정 폴더에 대한 사용하여 상위 파일을 나열 할 수 있습니다
private void onFilesInformationDownloaded(object sender,
LiveOperationCompletedEventArgs e) {
if (e.Result == null) {
// check e.Error for reason why it failed
return;
}
List<object> data = (List<object>)e.Result["data"];
foreach (IDictionary<string, object> content in data) {
string type = (string)content["type"];
if (type == "folder") {
// do something with folders?
}
string filename = (string)content["name"];
string fileId = (string)content["id"];
// use fileId to download a file or list files in a folder
// there's a few more details available in content.Keys
// such as created_time and updated_time for those interested
}
}
가 작동하지 않습니다 : 나는 e.Result에 대한 KeyNotFoundException을 얻을 [ "데이터"] – Calanus
예, 스카이 드라이브 폴더 즉 나 루트에 파일을 나열하도록 부탁 해요/skydrive – Calanus
사전을 반복하면서 키가 포함 된 키를 볼 수 있습니까? – MBen