Attention
You are looking at outdated documentation for version 2.x. A newer version is available.
wsgidav.samples.virtual_dav_provider.RootCollection.handleCopy¶
-
RootCollection.
handleCopy
(destPath, depthInfinity)¶ Handle a COPY request natively.
This method is called by the COPY 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:
- handleCopy() did not do anything. WsgiDAV will process the request by calling copyMoveSingle() for every resource, bottom-up.
- True:
- handleCopy() has successfully performed the COPY request. HTTP_NO_CONTENT/HTTP_CREATED will be reported to the DAV client.
- List of errors:
- handleCopy() tried to perform the copy 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:
- handleCopy() refuses to perform the copy request. The DAVError will be reported to the client.
An implementation may choose to apply other semantics and return True. For example copying ‘/by_tag/cool/myres’ to ‘/by_tag/hot/myres’ may simply add a ‘hot’ tag. 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.