Documentation ¶
Index ¶
- type S3FS
- func (fsys *S3FS) CreateFile(name string, mode fs.FileMode) (wfs.WriterFile, error)
- func (fsys *S3FS) Glob(pattern string) ([]string, error)
- func (fsys *S3FS) MkdirAll(dir string, mode fs.FileMode) error
- func (fsys *S3FS) Open(name string) (fs.File, error)
- func (fsys *S3FS) ReadDir(dir string) ([]fs.DirEntry, error)
- func (fsys *S3FS) ReadFile(name string) ([]byte, error)
- func (fsys *S3FS) RemoveAll(dir string) error
- func (fsys *S3FS) RemoveFile(name string) error
- func (fsys *S3FS) Stat(name string) (fs.FileInfo, error)
- func (fsys *S3FS) Sub(dir string) (fs.FS, error)
- func (fsys *S3FS) WriteFile(name string, p []byte, mode fs.FileMode) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type S3FS ¶
type S3FS struct { // DirOpenBufferSize is the buffer size for using objects as the directory. (Default 100) DirOpenBufferSize int // ListBufferSize is the buffer size for listing objects that is used on // ReadDir, Glob and RemoveAll. (Default 1000) ListBufferSize int // contains filtered or unexported fields }
S3FS represents a filesystem on S3 (Amazon Simple Storage Service).
func New ¶
New returns a filesystem for the tree of objects rooted at the specified bucket. This function is the same as the following code.
NewWithSession(bucket, session.Must( session.NewSessionWithOptions( session.Options{SharedConfigState: session.SharedConfigEnable} ) ))
func NewWithAPI ¶
NewWithAPI returns a filesystem for the tree of objects rooted at the specified bucket with the s3 client.
func NewWithSession ¶
NewWithSession returns a filesystem for the tree of objects rooted at the specified bucket with the session.
func (*S3FS) CreateFile ¶
CreateFile creates the named file. The specified mode is ignored.
func (*S3FS) Glob ¶
Glob returns the names of all files matching pattern, providing an implementation of the top-level Glob function.
func (*S3FS) ReadDir ¶
ReadDir reads the named directory and returns a list of directory entries sorted by filename.
func (*S3FS) RemoveFile ¶
RemoveFile removes the specified named file.
func (*S3FS) Stat ¶
Stat returns a FileInfo describing the file. If there is an error, it should be of type *PathError.