wsgidav.fs_dav_provider.FolderResource.set_property_value

FolderResource.set_property_value(name, value, *, dry_run=False)

Set a property value or remove a property.

value == None means ‘remove property’. Raise HTTP_FORBIDDEN if property is read-only, or not supported.

When dry_run is True, this function should raise errors, as in a real run, but MUST NOT change any data.

This default implementation

  • raises HTTP_FORBIDDEN, if trying to modify a locking property

  • raises HTTP_FORBIDDEN, if trying to modify an immutable {DAV:} property

  • handles Windows’ Win32LastModifiedTime to set the getlastmodified property, if enabled

  • stores everything else as dead property, if a property manager is present.

  • raises HTTP_FORBIDDEN, else

Removing a non-existing prop is NOT an error.

Note: RFC 4918 states that {DAV:}displayname ‘SHOULD NOT be protected’

A resource provider may override this method, to update supported custom live properties.