Documentation ¶
Overview ¶
Package tar provides support for operating on TAR archives
Index ¶
- Constants
- func New(options ...storage.Option) storage.Manager
- func NewBatchUploader(dest storage.Uploader) storage.BatchUploader
- func NewStorager(ctx context.Context, baseURL string, mgr storage.Manager) (storage.Storager, error)
- func NewWalker(download storage.Opener) storage.Walker
- func Provider(options ...storage.Option) (storage.Manager, error)
Examples ¶
Constants ¶
View Source
const Scheme = "tar"
Scheme defines tar URL scheme
Variables ¶
This section is empty.
Functions ¶
func NewBatchUploader ¶
func NewBatchUploader(dest storage.Uploader) storage.BatchUploader
NewBatchUploader returns a batch uploader
Example ¶
package main import ( "context" "github.com/viant/afs" "github.com/viant/afs/file" "github.com/viant/afs/tar" "log" ) func main() { ctx := context.Background() service := afs.New() uploader := tar.NewBatchUploader(file.New()) err := service.Copy(ctx, "/tmp/test/data", "/tmp/data.tar", uploader) if err != nil { log.Fatal(err) } }
Output:
func NewStorager ¶
func NewStorager(ctx context.Context, baseURL string, mgr storage.Manager) (storage.Storager, error)
NewStorager create a storage service
func NewWalker ¶
NewWalker returns a walker
Example ¶
package main import ( "context" "github.com/viant/afs" "github.com/viant/afs/file" "github.com/viant/afs/tar" "log" ) func main() { ctx := context.Background() service := afs.New() walker := tar.NewWalker(file.New()) err := service.Copy(ctx, "/tmp/test.tar", "mem://dest/folder/test", walker) if err != nil { log.Fatal(err) } }
Output:
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.