deleteObject method

Future<void> deleteObject({
  1. required String path,
})

Deletes an object at the specified path.

May throw ContainerNotFoundException. May throw ObjectNotFoundException. May throw InternalServerError.

Parameter path : The path (including the file name) where the object is stored in the container. Format: <folder name>/<folder name>/<file name>

Implementation

Future<void> deleteObject({
  required String path,
}) async {
  ArgumentError.checkNotNull(path, 'path');
  _s.validateStringLength(
    'path',
    path,
    1,
    900,
    isRequired: true,
  );
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri: '/${path.split('/').map(Uri.encodeComponent).join('/')}',
    exceptionFnMap: _exceptionFns,
  );
}