getAvailableTemplates method

Iterable<File> getAvailableTemplates()

Returns an iterable over the template files available in the templates directory in the configuration.

Implementation

Iterable<File> getAvailableTemplates() sync* {
  final Directory templatesDir = configuration.templatesDirectory;
  for (final File file in templatesDir.listSync().whereType<File>()) {
    if (file.basename.endsWith('.tmpl')) {
      yield file;
    }
  }
}