wsgidav.samples.mongo_dav_provider.DocResource#

class wsgidav.samples.mongo_dav_provider.DocResource(path, environ, doc)[source]#

Bases: DAVNonCollection

Mongo document, returned as virtual text resource.

DocResource.begin_write(*[, content_type])

Open content as a stream for writing.

DocResource.copy_move_single(dest_path, *, ...)

Copy or move this resource to destPath (non-recursive).

DocResource.create_collection(name)

Create a new collection as member of self.

DocResource.create_empty_resource(name)

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

DocResource.delete()

Remove this resource (recursive).

DocResource.end_write(*, with_errors)

Called when PUT has finished writing.

DocResource.finalize_headers(environ, ...)

Perform custom operations on the response headers.

DocResource.get_available_bytes()

Return available bytes of the DAV collection.

DocResource.get_content()

Open content as a stream for reading.

DocResource.get_content_length()

Returns the byte length of the content.

DocResource.get_content_type()

Contains the Content-Type header returned by a GET without accept headers.

DocResource.get_creation_date()

Records the time and date the resource was created.

DocResource.get_descendants(*[, ...])

Return a list _DAVResource objects of a collection (children, grand-children, ...).

DocResource.get_directory_info()

Return a list of dictionaries with information for directory rendering.

DocResource.get_display_info()

Return additional info dictionary for displaying (optional).

DocResource.get_display_name()

Provides a name for the resource that is suitable for presentation to a user.

DocResource.get_etag()

See http://www.webdav.org/specs/rfc4918.html#PROPERTY_getetag

DocResource.get_href()

Convert path to a URL that can be passed to XML responses.

DocResource.get_last_modified()

Contains the Last-Modified header returned by a GET method without accept headers.

DocResource.get_member(name)

Return child resource with a given name (None, if not found).

DocResource.get_member_list()

Return a list of direct members (_DAVResource or derived objects).

DocResource.get_member_names()

Return list of (direct) collection member names (UTF-8 byte strings).

DocResource.get_preferred_path()

Return preferred mapping for a resource mapping.

DocResource.get_properties(mode, *[, name_list])

Return properties as list of 2-tuples (name, value).

DocResource.get_property_names(*, is_allprop)

Return list of supported property names in Clark Notation.

DocResource.get_property_value(name)

Return the value of a property.

DocResource.get_ref_url()

Return the quoted, absolute, unique URL of a resource, relative to appRoot.

DocResource.get_used_bytes()

Return used bytes of the DAV collection.

DocResource.handle_copy(dest_path, *, ...)

Handle a COPY request natively.

DocResource.handle_delete()

Handle a DELETE request natively.

DocResource.handle_move(dest_path)

Handle a MOVE request natively.

DocResource.is_link()

DocResource.is_locked()

Return True, if URI is locked.

DocResource.move_recursive(dest_path)

Move this resource and members to destPath.

DocResource.prevent_locking()

Return True, to prevent locking.

DocResource.remove_all_locks(*, recursive)

DocResource.remove_all_properties(*, recursive)

Remove all associated dead properties.

DocResource.resolve(script_name, path_info)

Return a _DAVResource object for the path (None, if not found).

DocResource.set_last_modified(dest_path, ...)

Set last modified time for destPath to timeStamp on epoch-format

DocResource.set_property_value(name, value, *)

Set a property value or remove a property.

DocResource.support_content_length()

Return True, if this resource supports Content-Length.

DocResource.support_etag()

Return True, if this resource supports ETags.

DocResource.support_modified()

Return True, if this resource supports last modified dates.

DocResource.support_ranges()

Return True, if this non-resource supports Range on GET requests.

DocResource.support_recursive_delete()

Return True, if delete() may be called on non-empty collections (see comments there).

DocResource.support_recursive_move(dest_path)

Return True, if move_recursive() is available (see comments there).