I'm trying to create folder and then to store the metadata of create folder:
try
{
FolderMetadata folderMetadata = client.Files.CreateFolderAsync(newFolderPath).Result;
}
catch (Exception e)
{
string m = e.Message;
}
And it crashes without any exception.
This method is working for oneDrive : LiveOperationResult meResult = liveConnectClient.GetAsync("me").Result; //this gets info about the client and is also an awaitable task
So what's the best way to create a folder?
This one?
async Task CreateFolder(string folderName)
{
var response = await dbx.Files.CreateFolderAsync(folderName);
}
And then to call:
System.Threading.Tasks.Task taskCreateFolder = Task.Run(() => CreateFolder(cloudPath));<BR /> taskCreateFolder.Wait();<BR />
Thanks
|