Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hi ,
I don't understand how to use this method . What is supposed to do an AsyncCallback? Can you please provide me an example ?
Can I create a new folder in my root folder using this method?
Thank you
Yes, there are a few ways to do this. Here are three different versions I put together:
// blocking
Dropbox.Api.Files.FolderMetadata folderMetadata = await client.Files.CreateFolderAsync("/new_folder_via_CreateFolderAsync");
Console.WriteLine(folderMetadata.PathLower);
static void CompleteCreateFolder(IAsyncResult result)
{
Console.WriteLine("CreateFolder completed.");
Dropbox.Api.Files.FolderMetadata folderMetadata = client.Files.EndCreateFolder(result);
Console.WriteLine(folderMetadata.PathLower);
}
...
// non-blocking
IAsyncResult result = client.Files.BeginCreateFolder("/new_folder_via_BeginCreateFolder", new AsyncCallback(CompleteCreateFolder));
// blocking
Dropbox.Api.Files.FolderMetadata folderMetadata = client.Files.EndCreateFolder(client.Files.BeginCreateFolder ("/new_folder_via_BeginCreateFolder"));
Console.WriteLine(folderMetadata.PathLower);
Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!