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
(*[, ...])Open content as a stream for writing.
Copy or move this resource to destPath (non-recursive).
Create a new collection as member of self.
Create and return an empty (length-0) resource as member of self.
Remove this resource (recursive).
VirtualTextResource.end_write
(*, with_errors)Called when PUT has finished writing.
Perform custom operations on the response headers.
Return available bytes of the DAV collection.
Open content as a stream for reading.
Returns the byte length of the content.
Contains the Content-Type header returned by a GET without accept headers.
Records the time and date the resource was created.
VirtualTextResource.get_descendants
(*[, ...])Return a list _DAVResource objects of a collection (children, grand-children, ...).
Return a list of dictionaries with information for directory rendering.
Return additional info dictionary for displaying (optional).
Provides a name for the resource that is suitable for presentation to a user.
See http://www.webdav.org/specs/rfc4918.html#PROPERTY_getetag
Convert path to a URL that can be passed to XML responses.
Contains the Last-Modified header returned by a GET method without accept headers.
Return child resource with a given name (None, if not found).
Return a list of direct members (_DAVResource or derived objects).
Return list of (direct) collection member names (UTF-8 byte strings).
Return preferred mapping for a resource mapping.
VirtualTextResource.get_properties
(mode, *)Return properties as list of 2-tuples (name, value).
Return list of supported property names in Clark Notation.
Return the value of a property.
Return the quoted, absolute, unique URL of a resource, relative to appRoot.
Return used bytes of the DAV collection.
VirtualTextResource.handle_copy
(dest_path, ...)Handle a COPY request natively.
Handle a DELETE request natively.
VirtualTextResource.handle_move
(dest_path)Handle a MOVE request natively.
Return True, if URI is locked.
VirtualTextResource.move_recursive
(dest_path)Move this resource and members to destPath.
Return True, to prevent locking.
Remove all associated dead properties.
VirtualTextResource.resolve
(script_name, ...)Return a _DAVResource object for the path (None, if not found).
Set last modified time for destPath to timeStamp on epoch-format
VirtualTextResource.set_property_value
(name, ...)Set a property value or remove a property.
Return True, if this resource supports Content-Length.
Return True, if this resource supports ETags.
Return True, if this resource supports last modified dates.
Return True, if this non-resource supports Range on GET requests.
Return True, if delete() may be called on non-empty collections (see comments there).
Return True, if move_recursive() is available (see comments there).