wsgidav.samples.virtual_dav_provider.VirtualResource#

class wsgidav.samples.virtual_dav_provider.VirtualResource(path, environ, data)[source]#

Bases: DAVCollection

A virtual ‘resource’, displayed as a collection of artifacts and files.

VirtualResource.begin_write(*[, content_type])

Open content as a stream for writing.

VirtualResource.copy_move_single(dest_path, ...)

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

VirtualResource.create_collection(name)

Create a new collection as member of self.

VirtualResource.create_empty_resource(name)

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

VirtualResource.delete()

Remove this resource (possibly recursive).

VirtualResource.end_write(*, with_errors)

Called when PUT has finished writing.

VirtualResource.finalize_headers(environ, ...)

Perform custom operations on the response headers.

VirtualResource.get_available_bytes()

Return available bytes of the DAV collection.

VirtualResource.get_content()

Open content as a stream for reading.

VirtualResource.get_content_length()

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

VirtualResource.get_content_type()

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

VirtualResource.get_creation_date()

Records the time and date the resource was created.

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

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

VirtualResource.get_directory_info()

Return a list of dictionaries with information for directory rendering.

VirtualResource.get_display_info()

Return additional info dictionary for displaying (optional).

VirtualResource.get_display_name()

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

VirtualResource.get_etag()

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

VirtualResource.get_href()

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

VirtualResource.get_last_modified()

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

VirtualResource.get_member(name)

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

VirtualResource.get_member_list()

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

VirtualResource.get_member_names()

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

VirtualResource.get_preferred_path()

Return preferred mapping for a resource mapping.

VirtualResource.get_properties(mode, *[, ...])

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

VirtualResource.get_property_names(*, is_allprop)

Return list of supported property names in Clark Notation.

VirtualResource.get_property_value(name)

Return the value of a property.

VirtualResource.get_ref_url()

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

VirtualResource.get_used_bytes()

Return used bytes of the DAV collection.

VirtualResource.handle_copy(dest_path, *, ...)

Change semantic of COPY to add resource tags.

VirtualResource.handle_delete()

Change semantic of DELETE to remove resource tags.

VirtualResource.handle_move(dest_path)

Change semantic of MOVE to change resource tags.

VirtualResource.is_link()

VirtualResource.is_locked()

Return True, if URI is locked.

VirtualResource.move_recursive(dest_path)

Move this resource and members to destPath.

VirtualResource.prevent_locking()

Return True, to prevent locking.

VirtualResource.remove_all_locks(*, recursive)

VirtualResource.remove_all_properties(*, ...)

Remove all associated dead properties.

VirtualResource.resolve(script_name, path_info)

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

VirtualResource.set_last_modified(dest_path, ...)

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

VirtualResource.set_property_value(name, value)

Set or remove property value.

VirtualResource.support_content_length()

Return True, if this resource supports Content-Length.

VirtualResource.support_etag()

Return True, if this resource supports ETags.

VirtualResource.support_modified()

Return True, if this resource supports last modified dates.

VirtualResource.support_ranges()

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

VirtualResource.support_recursive_delete()

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

VirtualResource.support_recursive_move(dest_path)

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