cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Deleted Files list from Dropbox

Deleted Files list from Dropbox

TejaVarma
Explorer | Level 4

Hi,

 

Please suggest me Api, where I can see recent deleted files or folders from dropbox.

 

As I am working on 2waysync i need to remove those files from my app.

 

Thanks.

4 Replies 4

Mark
Super User II
*moves to API forum*

 


:penguin::penguin: - :penguin: - :penguin: - :penguin:


Heart Did this post help you? If so please mark it for some Kudos below. 


:white_check_mark: Did this post fix your issue/answer your question? If so please press the 'Accept as Solution' button to help others find it.


:arrows_counterclockwise: Did this post not resolve your issue? If so please give us some more information so we can try and help - please remember we cannot see over your shoulder so be as descriptive as possible! 


 

Greg-DB
Dropbox Staff

You can use listFolderBuilder to get a ListFolderBuilder, on which you can call .withIncludeDeleted(true) to tell the API to return deleted entries. Then, when you call .start() the returned ListFolderResult will include deleted entries.

 

Make sure you still check ListFolderResult.getHasMore() and call back to listFolderContinue if necessary, per the listFolderBuilder documentation.

 

 

TejaVarma
Explorer | Level 4

Hi,

 

I am using this code for getting Files and Folders

In place of cursor i am passing empty string

String cursor ="";

 

List<Metadata> metadataList = DropboxClientFactory.getInstance().getClient().files().listFolder(cursor).getEntries();

1. You suggested to use ListFolderBuild to get delete entries.

2. This is the code I am using.

Builder builder = new Builder("");
ListFolderBuilder folderBuilder = new ListFolderBuilder(DropboxClientFactory.getInstance().getClient(), builder).withIncludeDeleted(true);

3. But I struck with package which we need to use for  Builder (In Dropbox they are using (com.dropbox.core.v2.files.ListFolderArg). But this is not public class to use it.

 

Please suggest.

 

Thanks.

Greg-DB
Dropbox Staff

You don't need to access Builder. You can call listFolderBuilder directly on your client like this, just like in your first listFolder example:

 

client.files().listFolderBuilder("").withIncludeDeleted(true).start().getEntries();

 

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    TejaVarma Explorer | Level 4
  • User avatar
    Mark Super User II
What do Dropbox user levels mean?