code: def add_tagfile(self, path, timestamp=None):
          # type: (Text, datetime.datetime) -> None
          
          self.self_check()
          checksums = {}
          # Read file to calculate its checksum
          if os.path.isdir(path):
              return
              # FIXME: do the right thing for directories
          with open(path, "rb") as tag_file:
              # FIXME: Should have more efficient open_tagfile() that
              # does all checksums in one go while writing through,
              # adding checksums after closing.
              # Below probably OK for now as metadata files
              # are not too large..?
  
              checksums[SHA1] = checksum_copy(tag_file, hasher=hashlib.sha1)
  
              tag_file.seek(0)
              checksums[SHA256] = checksum_copy(tag_file, hasher=hashlib.sha256)
  
              tag_file.seek(0)
              checksums[SHA512] = checksum_copy(tag_file, hasher=hashlib.sha512)
  
          rel_path = _posix_path(os.path.relpath(path, self.folder))
          self.tagfiles.add(rel_path)
          self.add_to_manifest(rel_path, checksums)
          if timestamp is not None:
              self._file_provenance[rel_path] = {"createdOn": timestamp.isoformat()}
docs: Add tag files to our research object.