Search code examples
javadropbox

How to delete a dropbox file?


How can I delete a dropbox file?

The only way I found was

Metadata metadata = client.files().delete(path);

But this is a deprecated version so I need the current one


Solution

  • You can find the current version of the Dropbox Java SDK, for Dropbox API v2, here:

    https://github.com/dropbox/dropbox-sdk-java

    To delete a file, you should use the deleteV2 method:

    https://dropbox.github.io/dropbox-sdk-java/api-docs/v3.1.x/com/dropbox/core/v2/files/DbxUserFilesRequests.html#deleteV2-java.lang.String-java.lang.String-