code: func (d *Driver) GetMetadata(id string) (map[string]string, error) {
  	dir := d.dir(id)
  	if _, err := os.Stat(dir); err != nil {
  		return nil, err
  	}
  
  	metadata := make(map[string]string)
  
  	// If id has a root, it is an image
  	rootDir := path.Join(dir, "root")
  	if _, err := os.Stat(rootDir); err == nil {
  		metadata["RootDir"] = rootDir
  		return metadata, nil
  	}
  
  	lowerID, err := ioutil.ReadFile(path.Join(dir, "lower-id"))
  	if err != nil {
  		return nil, err
  	}
  
  	metadata["LowerDir"] = path.Join(d.dir(string(lowerID)), "root")
  	metadata["UpperDir"] = path.Join(dir, "upper")
  	metadata["WorkDir"] = path.Join(dir, "work")
  	metadata["MergedDir"] = path.Join(dir, "merged")
  
  	return metadata, nil
  }
docs: // GetMetadata returns metadata about the overlay driver such as root,
  // LowerDir, UpperDir, WorkDir and MergeDir used to store data.