code: func New(scope string, rootIdentity idtools.Identity) (*Root, error) {
  	rootDirectory := filepath.Join(scope, volumesPathName)
  
  	if err := idtools.MkdirAllAndChown(rootDirectory, 0700, rootIdentity); err != nil {
  		return nil, err
  	}
  
  	r := &Root{
  		scope:        scope,
  		path:         rootDirectory,
  		volumes:      make(map[string]*localVolume),
  		rootIdentity: rootIdentity,
  	}
  
  	dirs, err := ioutil.ReadDir(rootDirectory)
  	if err != nil {
  		return nil, err
  	}
  
  	for _, d := range dirs {
  		if !d.IsDir() {
  			continue
  		}
  
  		name := filepath.Base(d.Name())
  		v := &localVolume{
  			driverName: r.Name(),
  			name:       name,
  			path:       r.DataPath(name),
  		}
  		r.volumes[name] = v
  		optsFilePath := filepath.Join(rootDirectory, name, "opts.json")
  		if b, err := ioutil.ReadFile(optsFilePath); err == nil {
  			opts := optsConfig{}
  			if err := json.Unmarshal(b, &opts); err != nil {
  				return nil, errors.Wrapf(err, "error while unmarshaling volume options for volume: %s", name)
  			}
  			// Make sure this isn't an empty optsConfig.
  			// This could be empty due to buggy behavior in older versions of Docker.
  			if !reflect.DeepEqual(opts, optsConfig{}) {
  				v.opts = &opts
  			}
  
  			// unmount anything that may still be mounted (for example, from an unclean shutdown)
  			mount.Unmount(v.path)
  		}
  	}
  
  	return r, nil
  }
docs: // New instantiates a new Root instance with the provided scope. Scope
  // is the base path that the Root instance uses to store its
  // volumes. The base path is created here if it does not exist.