func (r *RewriteUploader) Close() error {
	return r.listener(r.resources)
}
Close notifies specified listener
package archive
import (
	"context"
	"github.com/viant/afs/asset"
	"io"
	"io/ioutil"
	"os"
	"path"
)
type RewriteUploader struct {
	resources []*asset.Resource
	listener  func(resources []*asset.Resource) error
}
func (r *RewriteUploader) Upload(ctx context.Context, parent string, info os.FileInfo, reader io.Reader) error {
	var data []byte
	var err error
	if !info.IsDir() {
		if data, err = ioutil.ReadAll(reader); err != nil {
			return err
		}
	}
	resource := asset.New(path.Join(parent, info.Name()), info.Mode(), info.IsDir(), "", data)
	resource.FileInfo = info
	r.resources = append(r.resources, resource)
	return nil
}