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