code: func (s *Filesystem) writeLockInfo(info *LockInfo) error {
  	path := s.lockInfoPath()
  	info.Path = s.readPath
  	info.Created = time.Now().UTC()
  
  	log.Printf("[TRACE] statemgr.Filesystem: writing lock metadata to %s", path)
  	err := ioutil.WriteFile(path, info.Marshal(), 0600)
  	if err != nil {
  		return fmt.Errorf("could not write lock info for %q: %s", s.readPath, err)
  	}
  	return nil
  }
docs: // write a new lock info file