def ReadDirectory(self, path, extension=u'yaml'):
    if extension:
      glob_spec = os.path.join(path, u'*.{0}'.format(extension))
    else:
      glob_spec = os.path.join(path, u'*')

    for yaml_file in glob.glob(glob_spec):
      for artifact_definition in self.ReadFile(yaml_file):
        yield artifact_definition
Reads artifact definitions from YAML files in a directory.
dataset/ETHPy150Open ForensicArtifacts/artifacts/artifacts/reader.py/YamlArtifactsReader.ReadDirectory