Attention

You are looking at outdated documentation for version 2.x. A newer version is available.

wsgidav.samples.virtual_dav_provider.VirtualResource

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

Bases: wsgidav.dav_provider.DAVCollection

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

VirtualResource.beginWrite([contentType]) Open content as a stream for writing.
VirtualResource.copyMoveSingle(destPath, isMove) Copy or move this resource to destPath (non-recursive).
VirtualResource.createCollection(name) Create a new collection as member of self.
VirtualResource.createEmptyResource(name) Create and return an empty (length-0) resource as member of self.
VirtualResource.delete() Remove this resource (possibly recursive).
VirtualResource.endWrite(withErrors) Called when PUT has finished writing.
VirtualResource.finalizeHeaders(environ, …) Perform custom operations on the response headers.
VirtualResource.getContent() Open content as a stream for reading.
VirtualResource.getContentLength() Contains the Content-Length header returned by a GET without accept headers.
VirtualResource.getContentType() Contains the Content-Type header returned by a GET without accept headers.
VirtualResource.getCreationDate() Records the time and date the resource was created.
VirtualResource.getDescendants([…]) Return a list _DAVResource objects of a collection (children, grand-children, …).
VirtualResource.getDirectoryInfo() Return a list of dictionaries with information for directory rendering.
VirtualResource.getDisplayInfo() Return additional info dictionary for displaying (optional).
VirtualResource.getDisplayName() Provides a name for the resource that is suitable for presentation to a user.
VirtualResource.getEtag() See http://www.webdav.org/specs/rfc4918.html#PROPERTY_getetag
VirtualResource.getHref() Convert path to a URL that can be passed to XML responses.
VirtualResource.getLastModified() Contains the Last-Modified header returned by a GET method without accept headers.
VirtualResource.getMember(name) Return child resource with a given name (None, if not found).
VirtualResource.getMemberList() Return a list of direct members (_DAVResource or derived objects).
VirtualResource.getMemberNames() Return list of (direct) collection member names (UTF-8 byte strings).
VirtualResource.getPreferredPath() Return preferred mapping for a resource mapping.
VirtualResource.getProperties(mode[, nameList]) Return properties as list of 2-tuples (name, value).
VirtualResource.getPropertyNames(isAllProp) Return list of supported property names in Clark Notation.
VirtualResource.getPropertyValue(propname) Return the value of a property.
VirtualResource.getRefUrl() Return the quoted, absolute, unique URL of a resource, relative to appRoot.
VirtualResource.handleCopy(destPath, …) Change semantic of COPY to add resource tags.
VirtualResource.handleDelete() Change semantic of DELETE to remove resource tags.
VirtualResource.handleMove(destPath) Change semantic of MOVE to change resource tags.
VirtualResource.isLocked() Return True, if URI is locked.
VirtualResource.moveRecursive(destPath) Move this resource and members to destPath.
VirtualResource.preventLocking() Return True, to prevent locking.
VirtualResource.removeAllLocks(recursive)
VirtualResource.removeAllProperties(recursive) Remove all associated dead properties.
VirtualResource.resolve(scriptName, pathInfo) Return a _DAVResource object for the path (None, if not found).
VirtualResource.setPropertyValue(propname, value) Set or remove property value.
VirtualResource.supportContentLength() Return True, if this resource supports Content-Length.
VirtualResource.supportEtag() Return True, if this resource supports ETags.
VirtualResource.supportModified() Return True, if this resource supports last modified dates.
VirtualResource.supportRanges() Return True, if this non-resource supports Range on GET requests.
VirtualResource.supportRecursiveDelete() Return True, if delete() may be called on non-empty collections (see comments there).
VirtualResource.supportRecursiveMove(destPath) Return True, if moveRecursive() is available (see comments there).