Announcements
Do you have an idea for Dropbox Paper? Share it with us here!

Issue with ListFolderAsync() ,windows form appliocation c# Dropbox api

anonymous
Not applicable

Hello,

I'm using ListFolderAsync() to fetch all files from particular folder of DropBox.

code : var list = await dbx.Files.ListFolderAsync(folderPath, true);

So,i am getting all path of files which is inside the folder and subfolders using PathDisplay.

code : 

foreach (var item in list.Entries.Where(i => i.IsFile))
listBox1.Items.Add("Name :" + item.PathDisplay); }

But all file pathDisplay not coming in order means first few file path of main folder afterthat some subfolder file path and again main folder file paths, So how can i get filespath in order like first subfolder file paths and than main folder files paths?

1 Accepted solution

Accepted Solutions

Re: Issue with ListFolderAsync() ,windows form appliocation c# Dropbox api

Star Collaborator | Level 19

Hi @anonymous,

grinning face When you make a call to a native OS API, are you receiving results ordered somehow? winking face Every application arranges the result in a target sequence or use some library to achieve this.

Hope this helps to some extent.

View solution in original post

Reply
Loading...
2 Replies

Re: Issue with ListFolderAsync() ,windows form appliocation c# Dropbox api

Star Collaborator | Level 19

Hi @anonymous,

grinning face When you make a call to a native OS API, are you receiving results ordered somehow? winking face Every application arranges the result in a target sequence or use some library to achieve this.

Hope this helps to some extent.

View solution in original post

Reply
Loading...

Re: Issue with ListFolderAsync() ,windows form appliocation c# Dropbox api

Dropboxer

@Anonymous The Dropbox API doesn't guarantee a particular ordering of folder list results, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.

Like Здравко said, you can apply whatever ordering you want in your application code.

Reply
Loading...
Developer & API Discussions

Have a question? Our Dropbox Community is here to help you find an answer!
You won’t have to wait too long for a reply, but why not learn more about the Community while you’re here.

Not the right discussion for you? Find out what else our Community has to say about Developer & API Discussions.

Or, search our Help Center for even more.

Who's talking
Top contributors to this post