2 DictFS allows you to easily create read-only filesystems when the
3 file tree is known in advance.
5 To create your own DictFS descendent, simply override the files
6 property, which can be created either using the property
7 decorator, or just a simple assignment.
9 A dictionary represents a directory, with keys corresponding to
10 file names and the values corresponding to the file contents.
16 from routes import Mapper
21 class DictFS(routefs.RouteFS):
22 controllers = ['handler']
27 This property should be overridden in your DictFS descendant
34 m.connect('/{path:.*}', controller='handler')
38 def handler(self, path, **kwargs):
40 elements = path.split(os.path.sep)
51 if type(tree) is dict: