wsgidav.samples.virtual_dav_provider.VirtualArtifact.move_recursive¶
- VirtualArtifact.move_recursive(dest_path)¶
Move this resource and members to destPath.
This method is only called, when support_recursive_move() returns True.
MOVE is frequently used by clients to rename a file without changing its parent collection, so it’s not appropriate to reset all live properties that are set at resource creation. For example, the DAV:creationdate property value SHOULD remain the same after a MOVE.
Preconditions (ensured by caller):
there must not be any conflicting locks or If-header on source
there must not be any conflicting locks or If-header on destination
destPath must not exist
destPath must not be a member of this resource
This method must be prepared to handle recursive moves. This implies that child errors must be reported as tuple list [ (<ref-url>, <DAVError>), … ]. See http://www.webdav.org/specs/rfc4918.html#move-collections
This function
moves this resource and all members to destPath.
MUST NOT move associated locks. Instead, if the source (or children thereof) have locks, then these locks should be removed.
SHOULD maintain associated live properties, when applicable See http://www.webdav.org/specs/rfc4918.html#dav.properties
MUST maintain associated dead properties
raises HTTP_FORBIDDEN for read-only resources
raises HTTP_INTERNAL_ERROR on error
An implementation may choose to apply other semantics. For example copying ‘/by_tag/cool/myres’ to ‘/by_tag/new/myres’ may simply add a ‘new’ tag to ‘my_res’.
This method is only called, when self.support_recursive_move() returns True. Otherwise, the request server implements MOVE using delete/copy.
This method MAY be implemented in order to improve performance.