wsgidav.samples.virtual_dav_provider.CategoryCollection.create_empty_resource

CategoryCollection.create_empty_resource(name: str) _DAVResource

Create and return an empty (length-0) resource as member of self.

Called for LOCK requests on unmapped URLs.

Preconditions (to be ensured by caller):

  • this must be a collection

  • <self.path + name> must not exist

  • there must be no conflicting locks

Returns a DAVResuource.

This method MUST be implemented by all providers that support write access. This default implementation simply raises HTTP_FORBIDDEN.