Part of nevow.static View Source View In Hierarchy
Implements interfaces: nevow.inevow.IResource
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 .| Line # | Kind | Name | Docs |
|---|---|---|---|
| 187 | Method | __init__ | Create a file with the given path. |
| 204 | Method | ignoreExt | Ignore the given extension. |
| 211 | Method | directoryListing | Undocumented |
| 218 | Method | putChild | Undocumented |
| 221 | Method | locateChild | Locate another object which can be adapted to IResource |
| 262 | Method | openForReading | Open a file and return it. |
| 266 | Method | getFileSize | Return file size. |
| 271 | Method | renderHTTP | You know what you doing. |
| 346 | Method | redirect | Undocumented |
| 349 | Method | listNames | Undocumented |
| 356 | Method | createSimilarFile | Undocumented |