1
0
Fork 0
mirror of https://github.com/Luzifer/s3sync.git synced 2024-10-18 06:24:20 +00:00
s3sync/pkg/fsprovider/interface.go

27 lines
620 B
Go
Raw Normal View History

// Package fsprovider contains implementations for filesystem access
// to read files from / write files to
package fsprovider
import (
"io"
"time"
)
type (
// File contains metadata about the file to be copied
File struct {
Filename string
LastModified time.Time
Size int64
}
// Provider describes the implementation of a fsprovider
Provider interface {
WriteFile(path string, content io.Reader, public bool) error
ReadFile(path string) (io.ReadCloser, error)
ListFiles(prefix string) ([]File, error)
DeleteFile(path string) error
GetAbsolutePath(path string) (string, error)
}
)