0
OneDrive 사용자의 "기록 된"폴더 안에 모든 ".wav"파일을 다운로드해야합니다. 이 코드를 사용하고 있지만 다운로드 한 파일은 0KB입니다. 이 코드에서 오류를 찾을 수 없습니다.OneDrive에서 .wav 파일 다운로드
LiveOperationResult operationResult = await client.GetAsync(folderId + "/files");
var iEnum = operationResult.Result.Values.GetEnumerator();
iEnum.MoveNext();
var files = iEnum.Current as IEnumerable;
foreach (dynamic v in files)
{
var downloadOperationResult = await client.DownloadAsync(v.id as string);
using (Stream downloadStream = downloadOperationResult.Stream)
{
if (downloadStream != null)
{
using (IsolatedStorageFile storage = IsolatedStorageFile.GetUserStoreForApplication())
{
if (!storage.DirectoryExists("Recorded")) storage.CreateDirectory("Recorded");
using (
IsolatedStorageFileStream fileToSave = storage.OpenFile("/Recorded/" + v.name as string,
FileMode.Create, FileAccess.ReadWrite))
{
downloadStream.CopyTo(fileToSave);
downloadStream.Flush();
downloadStream.Close();
}
}
}
}
}