Forum Discussion

TejaVarma's avatar
TejaVarma
Explorer | Level 4
8 years ago

Deleted Files list from Dropbox

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.

    • TejaVarma's avatar
      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's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox 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();

         

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,950 PostsLatest Activity: 4 hours ago
352 Following

If you need more help you can view your support options (expected response time for an email or 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!