Module t.w.d.util

Part of twisted.web2.dav View Source

Utilities

This API is considered private to static.py and is therefore subject to change.
Function allDataFromStream Undocumented
Function davXMLFromStream Undocumented
Function noDataFromStream Undocumented
Function normalizeURL Normalized a URL.
Function joinURL Appends URLs in series.
Function parentForURL Extracts the URL of the containing collection resource for the resource
Function unimplemented Throw an exception signifying that the current method is unimplemented
Function bindMethods Binds all functions in the given module (as defined by that module's
def allDataFromStream(stream, filter=None): (source)
Undocumented
def davXMLFromStream(stream): (source)
Undocumented
def noDataFromStream(stream): (source)
Undocumented
def normalizeURL(url): (source)
Normalized a URL.
Parametersurla URL.
Returnsthe normalized representation of url. The returned URL will never contain a trailing "/"; it is up to the caller to determine whether the resource referred to by the URL is a collection and add a trailing "/" if so.
def joinURL(*urls): (source)
Appends URLs in series.
ParametersurlsURLs to join.
Returnsthe normalized URL formed by combining each URL in urls. The returned URL will contain a trailing "/" if and only if the last given URL contains a trailing "/".
def parentForURL(url): (source)
Extracts the URL of the containing collection resource for the resource corresponding to a given URL.
Parametersurlan absolute (server-relative is OK) URL.
Returnsthe normalized URL of the collection resource containing the resource corresponding to url. The returned URL will always contain a trailing "/".
def unimplemented(obj): (source)
Throw an exception signifying that the current method is unimplemented and should not have been invoked.
def bindMethods(module, clazz, prefixes=('preconditions_', 'http_', 'report_')): (source)
Binds all functions in the given module (as defined by that module's __all__ attribute) which start with any of the given prefixes as methods of the given class.
Parametersmodulethe module in which to search for functions.
clazzthe class to bind found functions to as methods.
prefixesa sequence of prefixes to match found functions against.
API Documentation for twisted, generated by pydoctor.