code: func NewBase(p *paths.Paths, options ...func(*BaseFs) error) (*BaseFs, error) {
  	fs := p.Fs
  
  	publishFs := afero.NewBasePathFs(fs.Destination, p.AbsPublishDir)
  
  	contentFs, absContentDirs, err := createContentFs(fs.Source, p.WorkingDir, p.DefaultContentLanguage, p.Languages)
  	if err != nil {
  		return nil, err
  	}
  
  	// Make sure we don't have any overlapping content dirs. That will never work.
  	for i, d1 := range absContentDirs {
  		for j, d2 := range absContentDirs {
  			if i == j {
  				continue
  			}
  			if strings.HasPrefix(d1, d2) || strings.HasPrefix(d2, d1) {
  				return nil, fmt.Errorf("found overlapping content dirs (%q and %q)", d1, d2)
  			}
  		}
  	}
  
  	b := &BaseFs{
  		PublishFs: publishFs,
  	}
  
  	for _, opt := range options {
  		if err := opt(b); err != nil {
  			return nil, err
  		}
  	}
  
  	builder := newSourceFilesystemsBuilder(p, b)
  	sourceFilesystems, err := builder.Build()
  	if err != nil {
  		return nil, err
  	}
  
  	sourceFilesystems.Content = &SourceFilesystem{
  		SourceFs: fs.Source,
  		Fs:       contentFs,
  		Dirnames: absContentDirs,
  	}
  
  	b.SourceFilesystems = sourceFilesystems
  	b.themeFs = builder.themeFs
  	b.AbsThemeDirs = builder.absThemeDirs
  
  	return b, nil
  }
docs: // NewBase builds the filesystems used by Hugo given the paths and options provided.NewBase