wsgidav.samples.dav_provider_tools.VirtualTextResource¶
-
class
wsgidav.samples.dav_provider_tools.
VirtualTextResource
(path, environ, content, display_name=None, display_type=None)[source]¶ Bases:
wsgidav.samples.dav_provider_tools._VirtualNonCollection
A virtual file, containing a string.
VirtualTextResource.begin_write
([content_type])Open content as a stream for writing. VirtualTextResource.copy_move_single
(…)Copy or move this resource to destPath (non-recursive). VirtualTextResource.create_collection
(name)Create a new collection as member of self. VirtualTextResource.create_empty_resource
(name)Create and return an empty (length-0) resource as member of self. VirtualTextResource.delete
()Remove this resource (recursive). VirtualTextResource.end_write
(with_errors)Called when PUT has finished writing. VirtualTextResource.finalize_headers
(…)Perform custom operations on the response headers. VirtualTextResource.get_content
()Open content as a stream for reading. VirtualTextResource.get_content_length
()Returns the byte length of the content. VirtualTextResource.get_content_type
()Contains the Content-Type header returned by a GET without accept headers. VirtualTextResource.get_creation_date
()Records the time and date the resource was created. VirtualTextResource.get_descendants
([…])Return a list _DAVResource objects of a collection (children, grand-children, …). VirtualTextResource.get_directory_info
()Return a list of dictionaries with information for directory rendering. VirtualTextResource.get_display_info
()Return additional info dictionary for displaying (optional). VirtualTextResource.get_display_name
()Provides a name for the resource that is suitable for presentation to a user. VirtualTextResource.get_etag
()See http://www.webdav.org/specs/rfc4918.html#PROPERTY_getetag VirtualTextResource.get_href
()Convert path to a URL that can be passed to XML responses. VirtualTextResource.get_last_modified
()Contains the Last-Modified header returned by a GET method without accept headers. VirtualTextResource.get_member_list
()Return a list of direct members (_DAVResource or derived objects). VirtualTextResource.get_member_names
()Return list of (direct) collection member names (UTF-8 byte strings). VirtualTextResource.get_preferred_path
()Return preferred mapping for a resource mapping. VirtualTextResource.get_properties
(mode[, …])Return properties as list of 2-tuples (name, value). VirtualTextResource.get_property_names
(…)Return list of supported property names in Clark Notation. VirtualTextResource.get_property_value
(name)Return the value of a property. VirtualTextResource.get_ref_url
()Return the quoted, absolute, unique URL of a resource, relative to appRoot. VirtualTextResource.handle_copy
(dest_path, …)Handle a COPY request natively. VirtualTextResource.handle_delete
()Handle a DELETE request natively. VirtualTextResource.handle_move
(dest_path)Handle a MOVE request natively. VirtualTextResource.is_locked
()Return True, if URI is locked. VirtualTextResource.move_recursive
(dest_path)Move this resource and members to destPath. VirtualTextResource.prevent_locking
()Return True, to prevent locking. VirtualTextResource.remove_all_locks
(recursive)VirtualTextResource.remove_all_properties
(…)Remove all associated dead properties. VirtualTextResource.resolve
(script_name, …)Return a _DAVResource object for the path (None, if not found). VirtualTextResource.set_last_modified
(…)Set last modified time for destPath to timeStamp on epoch-format VirtualTextResource.set_property_value
(name, …)Set a property value or remove a property. VirtualTextResource.support_content_length
()Return True, if this resource supports Content-Length. VirtualTextResource.support_etag
()Return True, if this resource supports ETags. VirtualTextResource.support_modified
()Return True, if this resource supports last modified dates. VirtualTextResource.support_ranges
()Return True, if this non-resource supports Range on GET requests. VirtualTextResource.support_recursive_delete
()Return True, if delete() may be called on non-empty collections (see comments there). VirtualTextResource.support_recursive_move
(…)Return True, if move_recursive() is available (see comments there).