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.
14 from routes import Mapper
17 class DictFS(routefs.RouteFS):
21 This property should be overridden in your DictFS descendant
28 m.connect('*path', controller='handler')
32 def handler(self, path, **kwargs):
34 elements = path.split(os.path.sep)
45 if type(tree) is dict: