MCPcopy Create free account
hub / github.com/nodejs/node / list_templates

Method list_templates

tools/inspector_protocol/jinja2/loaders.py:250–267  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

248 return source.decode(self.encoding), filename, uptodate
249
250 def list_templates(self):
251 path = self.package_path
252 if path[:2] == './':
253 path = path[2:]
254 elif path == '.':
255 path = ''
256 offset = len(path)
257 results = []
258 def _walk(path):
259 for filename in self.provider.resource_listdir(path):
260 fullname = path + '/' + filename
261 if self.provider.resource_isdir(fullname):
262 _walk(fullname)
263 else:
264 results.append(fullname[offset:].lstrip('/'))
265 _walk(path)
266 results.sort()
267 return results
268
269
270class DictLoader(BaseLoader):

Callers

nothing calls this directly

Calls 1

sortMethod · 0.80

Tested by

no test coverage detected