move method
Moves the resource from sourcePath
to destinationPath
.
overwrite
determines if the request will fail if the destinationPath
already exists.
See:
- http://www.webdav.org/specs/rfc2518.html#METHOD_MOVE for more information.
- move_Request for the request sent by this method.
Implementation
Future<http.StreamedResponse> move(
PathUri sourcePath,
PathUri destinationPath, {
bool overwrite = false,
}) async {
final request = move_Request(
sourcePath,
destinationPath,
overwrite: overwrite,
);
final streamedResponse = await httpClient.send(request);
if (streamedResponse.statusCode != 201 && streamedResponse.statusCode != 204) {
final response = await http.Response.fromStream(streamedResponse);
throw DynamiteStatusCodeException(response);
}
return streamedResponse;
}