Print the content of a directory.

Instance Variable template page template used to render the content of the directory. It must contain the format keys header and tableContent. (type: str)
Instance Variable linePattern template used to render one line in the listing table. It must contain the format keys class, href, text, size, type and encoding. (type: str)
Instance Variable contentTypes a mapping of extensions to MIME types used to populate the information of a member of this directory. It is initialized with the value File.contentTypes. (type: dict)
Instance Variable contentEncodings a mapping of extensions to encoding types. It is initialized with the value File.contentEncodings. (type: dict)
Instance Variable defaultType default type used when no mimetype is detected. (type: str)
Instance Variable dirs filtered content of path, if the whole content should not be displayed (default to None, which means the actual content of path is printed). (type: None or list)
Instance Variable path directory which content should be listed. (type: str)
Method __init__ Initialize.
Method render Render a listing of the content of self.path.
Method __repr__ Undocumented
Method _getFilesAndDirectories Helper returning files and directories in given directory listing, with attributes to be used to build a table content with self.linePattern.
Method _buildTableContent Build a table content using self.linePattern and giving elements odd and even classes.

Inherited from Resource:

Method listStaticNames Undocumented
Method listStaticEntities Undocumented
Method listNames Undocumented
Method listEntities Undocumented
Method listDynamicNames Undocumented
Method listDynamicEntities Undocumented
Method getStaticEntity Undocumented
Method getDynamicEntity Undocumented
Method delEntity Undocumented
Method reallyPutEntity Undocumented
Method getChild Retrieve a 'child' resource from me.
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.
template =
page template used to render the content of the directory. It must contain the format keys header and tableContent. (type: str)
linePattern =
template used to render one line in the listing table. It must contain the format keys class, href, text, size, type and encoding. (type: str)
contentTypes =
a mapping of extensions to MIME types used to populate the information of a member of this directory. It is initialized with the value File.contentTypes. (type: dict)
contentEncodings =
a mapping of extensions to encoding types. It is initialized with the value File.contentEncodings. (type: dict)
defaultType =
default type used when no mimetype is detected. (type: str)
dirs =
filtered content of path, if the whole content should not be displayed (default to None, which means the actual content of path is printed). (type: None or list)
path =
directory which content should be listed. (type: str)
def __init__(self, pathname, dirs=None, contentTypes=File.contentTypes, contentEncodings=File.contentEncodings, defaultType='text/html'): (source)
def _getFilesAndDirectories(self, directory): (source)

Helper returning files and directories in given directory listing, with attributes to be used to build a table content with self.linePattern.

Returnstuple of (directories, files) (type: tuple of list)
def _buildTableContent(self, elements): (source)

Build a table content using self.linePattern and giving elements odd and even classes.

def render(self, request): (source)

Render a listing of the content of self.path.

def __repr__(self): (source)
Undocumented
API Documentation for Twisted, generated by pydoctor at 2018-07-14 04:53:34.