Part of twisted.web.static View Source View In Hierarchy
File is a resource that represents a plain non-interpreted file (although it can look for an extension like .rpy or .cgi and hand the file to a processor for interpretation if you wish). Its constructor takes a file path.
Alternatively, you can give a directory path to the constructor. In this case the resource will represent that directory, and its children will be files underneath that directory. This provides access to an entire filesystem tree with a single Resource.
If you map the URL 'http://server/FILE' to a resource created as File('/tmp'), then http://server/FILE/ will return an HTML-formatted listing of the /tmp/ directory, and http://server/FILE/foo/bar.html will return the contents of /tmp/foo/bar.html .Class Variables | childNotFound | Resource
used to render 404 Not Found error pages.
|
Method | upgradeToVersion6 | Undocumented |
Method | upgradeToVersion5 | Undocumented |
Method | upgradeToVersion4 | Undocumented |
Method | upgradeToVersion3 | Undocumented |
Method | upgradeToVersion2 | Undocumented |
Method | upgradeToVersion1 | Undocumented |
Method | __init__ | Create a file with the given path. |
Method | ignoreExt | Ignore the given extension. |
Method | directoryListing | Undocumented |
Method | getChild | See twisted.web.Resource.getChild. |
Method | openForReading | Open a file and return it. |
Method | getFileSize | Return file size. |
Method | render | You know what you doing. |
Method | redirect | Undocumented |
Method | listNames | Undocumented |
Method | listEntities | Undocumented |
Method | createPickleChild | Undocumented |
Method | createSimilarFile | Undocumented |
Inherited from Resource:
Method | listStaticNames | Undocumented |
Method | listStaticEntities | Undocumented |
Method | listDynamicNames | Undocumented |
Method | listDynamicEntities | Undocumented |
Method | getStaticEntity | Undocumented |
Method | getDynamicEntity | Undocumented |
Method | delEntity | Undocumented |
Method | reallyPutEntity | Undocumented |
Method | getChildWithDefault | Retrieve a static or dynamically generated child resource from me. |
Method | getChildForRequest | Undocumented |
Method | putChild | Register a static child. |
Method | render_HEAD | Default handling of HEAD method. |
Inherited from Versioned:
Method | __setstate__ | Undocumented |
Method | __getstate__ | Get state, adding a version number to it on its way out. |
Method | versionUpgrade | (internal) Do a version upgrade. |
Inherited from FilePath:
Method | __getstate__ | Undocumented |
Method | child | Undocumented |
Method | preauthChild | Use me if `path' might have slashes in it, but you know they're safe. |
Method | childSearchPreauth | Return my first existing child with a name in 'paths'. |
Method | siblingExtensionSearch | Attempt to return a path with my name, given multiple possible |
Method | siblingExtension | Undocumented |
Method | open | Undocumented |
Method | restat | Undocumented |
Method | getsize | Undocumented |
Method | getmtime | Undocumented |
Method | getctime | Undocumented |
Method | getatime | Undocumented |
Method | exists | Undocumented |
Method | isdir | Undocumented |
Method | isfile | Undocumented |
Method | islink | Undocumented |
Method | isabs | Undocumented |
Method | listdir | Undocumented |
Method | splitext | Undocumented |
Method | __repr__ | Undocumented |
Method | touch | Undocumented |
Method | remove | Undocumented |
Method | makedirs | Undocumented |
Method | globChildren | Assuming I am representing a directory, return a list of |
Method | basename | Undocumented |
Method | dirname | Undocumented |
Method | parent | Undocumented |
Method | setContent | Undocumented |
Method | __cmp__ | Undocumented |
Method | createDirectory | Undocumented |
Method | requireCreate | Undocumented |
Method | create | Exclusively create a file, only if this file previously did not exist. |
Method | temporarySibling | Create a path naming a temporary sibling of this path in a secure fashion. |
Method | copyTo | Undocumented |
Method | moveTo | Undocumented |
Inherited from _PathHelper (via FilePath):
Method | getContent | Undocumented |
Method | children | Undocumented |
Method | walk | Yield myself, then each of my children, and each of those children's |
Method | sibling | Undocumented |
Method | segmentsFrom | Return a list of segments between a child and its ancestor. |