func (s *storager) walk(ctx context.Context, location string, skipBaseLocation bool, handler func(relative string, info os.FileInfo, reader io.Reader) (bool, error), options ...storage.Option) error {
	session, err := newSession(s.Client, modeRead, true, s.timeout)
	if err != nil {
		return err
	}
	location = path.Clean(location)
	return session.download(ctx, skipBaseLocation, location, handler)
}
Walk visits location resources
package scp
import (
	"bytes"
	"context"
	"fmt"
	"github.com/pkg/errors"
	"github.com/viant/afs/base"
	"github.com/viant/afs/file"
	"github.com/viant/afs/option"
	"github.com/viant/afs/storage"
	"golang.org/x/crypto/ssh"
	"io"
	"io/ioutil"
	"os"
	"path"
	"strings"
	"time"
)
type storager struct {
	base.Storager
	address string
	*ssh.ClientConfig
	*ssh.Client
	timeout time.Duration
}
func (s *storager) connect() (err error) {
	if s.Client, err = ssh.Dial("tcp", s.address, s.ClientConfig); err != nil {
		return errors.Wrap(err, fmt.Sprintf("failed to dial %s", s.address))
	}
	return nil
}
func (s *storager) Delete(ctx context.Context, location string, options ...storage.Option) error {
	session, err := s.NewSession()
	if err == nil {
		_, err = session.Output(fmt.Sprintf("rm -rf %v", location))
	}
	return err
}
func (s *storager) Exists(ctx context.Context, location string, options ...storage.Option) (bool, error) {
	session, err := newSession(s.Client, modeRead, true, s.timeout)
	if err != nil {
		return false, err
	}
	location = path.Clean(location)
	has := false
	_ = session.download(ctx, false, location, func(parent string, info os.FileInfo, reader io.Reader) (b bool, e error) {
		has = true
		return false, nil
	})
	return has, nil
}
func (s *storager) List(ctx context.Context, location string, options ...storage.Option) ([]os.FileInfo, error) {
	match, page := option.GetListOptions(options)
	var result = make([]os.FileInfo, 0)
	err := s.walk(ctx, location, false, func(relative string, info os.FileInfo, reader io.Reader) (shaleContinue bool, err error) {
		if !match(relative, info) {
			return true, nil
		}
		page.Increment()
		if page.ShallSkip() {
			return true, nil
		}
		result = append(result, info)
		return !page.HasReachedLimit(), nil
	})
	return result, err
}
func (s *storager) Walk(ctx context.Context, location string, handler func(relative string, info os.FileInfo, reader io.Reader) (bool, error), options ...storage.Option) error {
	return s.walk(ctx, location, true, handler)
}