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