Attention

You are looking at outdated documentation for version 2.x. A newer version is available.

wsgidav.samples.dav_provider_tools.VirtualCollection.handleMove

VirtualCollection.handleMove(destPath)

Handle a MOVE request natively.

This method is called by the MOVE handler after checking for valid request syntax and making sure that there are no conflicting locks and If-headers. Depending on the return value, this provider can control further processing:

False:
handleMove() did not do anything. WsgiDAV will process the request by calling delete() and copyMoveSingle() for every resource, bottom-up.
True:
handleMove() has successfully performed the MOVE request. HTTP_NO_CONTENT/HTTP_CREATED will be reported to the DAV client.
List of errors:
handleMove() tried to perform the move request, but failed completely or partially. A list of errors is returned like [ (<ref-url>, <DAVError>), ... ] These errors will be reported to the client.
DAVError raised:
handleMove() refuses to perform the move request. The DAVError will be reported to the client.

An implementation may choose to apply other semantics and return True. For example moving ‘/by_tag/cool/myres’ to ‘/by_tag/hot/myres’ may simply remove the ‘cool’ tag from ‘my_res’ and add a ‘hot’ tag instead. In this case, the resource might still be available by other URLs, so locks and properties are not removed.

This default implementation returns False, so standard processing takes place.

Implementation of this method is OPTIONAL.