Mercurial > piecrust2
diff piecrust/sources/fs.py @ 866:d9059257743c
refactor: Make the linker work again.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Mon, 12 Jun 2017 22:10:50 -0700 |
parents | fddaf43424e2 |
children | 7e7fc7926307 |
line wrap: on
line diff
--- a/piecrust/sources/fs.py Thu Jun 08 23:32:19 2017 -0700 +++ b/piecrust/sources/fs.py Mon Jun 12 22:10:50 2017 -0700 @@ -139,6 +139,13 @@ def _finalizeContent(self, parent_group, items, groups): pass + def findGroup(self, rel_spec): + path = os.path.join(self.fs_endpoint_path, rel_spec) + if os.path.isdir(path): + metadata = self._createGroupMetadata(path) + return ContentGroup(path, metadata) + return None + def getRelatedContents(self, item, relationship): if relationship == REL_LOGICAL_PARENT_ITEM: # If we want the logical parent item of a folder, we find a @@ -165,12 +172,6 @@ return None - def findContent(self, route_params): - rel_path = route_params['path'] - path = os.path.join(self.fs_endpoint_path, rel_path) - metadata = self._createItemMetadata(path) - return ContentItem(path, metadata) - def getSupportedRouteParameters(self): return [ RouteParameter('path', RouteParameter.TYPE_PATH)]