code: func (i *Index) RetainFileSet() (*FileSet, error) {
  	i.mu.RLock()
  	defer i.mu.RUnlock()
  
  	fs, _ := NewFileSet(nil, i.sfile, nil)
  	for _, p := range i.partitions {
  		pfs, err := p.RetainFileSet()
  		if err != nil {
  			fs.Close()
  			return nil, err
  		}
  		fs.files = append(fs.files, pfs.files...)
  	}
  	return fs, nil
  }
docs: // RetainFileSet returns the set of all files across all partitions.
  // This is only needed when all files need to be retained for an operation.