Skip to content

Deleting a Directory

To delete a directory from the Backendless file storage, it must be identified by the its path. Directories in the Backendless storage have the following URL structure:

https://api.backendless.com/<application id>/<REST API Key>/files/<path>

The API to delete a directory uses the <path> element from the URL above.

Non-Blocking API

public void Backendless.Files.removeDirectory( String path, 
                                               AsyncCallback<Void> responder )

Blocking API

public void Backendless.Files.removeDirectory( String path ) throws Exception

where:

Argument                Description
path path of the directory to delete.
responder a responder object which receives a callback when the method successfully deleted the directory or if an error occurs. Applies to the asynchronous methods only.

Example

Backendless.Files.removeDirectory( "pictures", new AsyncCallback<Void>()
{
  @Override
  public void handleResponse()
  {
  }

  @Override
  public void handleFault( BackendlessFault backendlessFault )
  {
  }
}