Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

382 B
Raw Blame
package readers

import (
	"errors"
	"io"
)

var (
	errCantSeek = errors.New("can't Seek")
)

// NoSeeker adapts an io.Reader into an io.ReadSeeker.
//
// However if Seek() is called it will return an error.
type NoSeeker struct {
	io.Reader
}

// Seek the stream - returns an error
func (r NoSeeker) Seek(offset int64, whence int) (abs int64, err error) {
	return 0, errCantSeek
}