code: func (nm DatastoreNamespaceManager) DeleteDirectory(ctx context.Context, dc *Datacenter, datastorePath string) error {
  
  	req := &types.DeleteDirectory{
  		This:          nm.Reference(),
  		DatastorePath: datastorePath,
  	}
  
  	if dc != nil {
  		ref := dc.Reference()
  		req.Datacenter = &ref
  	}
  
  	if _, err := methods.DeleteDirectory(ctx, nm.c, req); err != nil {
  		return err
  	}
  
  	return nil
  }
docs: // DeleteDirectory deletes the given top-level directory from a vsan datastore.