Documentation ¶
Index ¶
- Variables
- type Config
- type DirEntry
- type ErrInvalidHeader
- type ErrNotDirectory
- type ErrNotEmpty
- type FS
- type FSS3
- func (fss3 *FSS3) Chmod(name string, mode fs.FileMode) error
- func (fss3 *FSS3) Create(name string) (*File, error)
- func (fss3 *FSS3) FS() fs.FS
- func (fss3 *FSS3) Mkdir(name string, mode fs.FileMode) error
- func (fss3 *FSS3) MkdirAll(name string, mode fs.FileMode) error
- func (fss3 *FSS3) Open(name string) (*File, error)
- func (fss3 *FSS3) ReadDir(name string) ([]fs.DirEntry, error)
- func (fss3 *FSS3) ReadFile(name string) ([]byte, error)
- func (fss3 *FSS3) Remove(name string) error
- func (fss3 *FSS3) RemoveAll(path string) error
- func (fss3 *FSS3) Stat(name string) (fs.FileInfo, error)
- func (fss3 *FSS3) WalkDir(root string, fn fs.WalkDirFunc) error
- func (fss3 *FSS3) WriteFile(name string, data []byte, perm fs.FileMode) error
- func (fss3 *FSS3) WriteFrom(name string, r io.Reader, perm fs.FileMode) error
- type File
- func (f *File) Close() error
- func (f *File) Read(b []byte) (int, error)
- func (f *File) ReadDir(n int) ([]fs.DirEntry, error)
- func (f *File) Stat() (fs.FileInfo, error)
- func (f *File) Write(p []byte) (int, error)
- func (f *File) WriteString(s string) (int, error)
- func (f *File) WriteTo(w io.Writer) (int64, error)
- type FileInfo
Constants ¶
This section is empty.
Variables ¶
var ErrNoFileInfo = errors.New("fileInfo not found")
ErrNoFileInfo is returned when a file info is not found.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { AccessKeyID string SecretAccessKey string Endpoint string Region string UseSSL bool BucketName string Umask int DirFileName string }
Config is the configuration for the FSS3 client.
type DirEntry ¶
type DirEntry struct {
// contains filtered or unexported fields
}
DirEntry implements fs.DirEntry.
type ErrInvalidHeader ¶
type ErrInvalidHeader struct {
// contains filtered or unexported fields
}
ErrInvalidHeader is returned when an invalid path is provided.
func (ErrInvalidHeader) Error ¶
func (e ErrInvalidHeader) Error() string
type ErrNotDirectory ¶
type ErrNotDirectory struct {
// contains filtered or unexported fields
}
ErrNotDirectory is returned when a path is not a directory.
func (ErrNotDirectory) Error ¶
func (e ErrNotDirectory) Error() string
type ErrNotEmpty ¶
type ErrNotEmpty struct {
// contains filtered or unexported fields
}
ErrNotEmpty is returned when a directory is not empty.
func (ErrNotEmpty) Error ¶
func (e ErrNotEmpty) Error() string
type FS ¶ added in v0.2.0
type FS struct {
// contains filtered or unexported fields
}
FS implements the fs.FS interface.
type FSS3 ¶
type FSS3 struct {
// contains filtered or unexported fields
}
FSS3 represents an opened bucket.
func (*FSS3) Create ¶
Create creates or truncates the named object. The object is created with mode 0666 (before umask).
func (*FSS3) Remove ¶
Remove removes the named file or directory. If directory is not empty, it returns an error.
func (*FSS3) WalkDir ¶ added in v0.2.0
func (fss3 *FSS3) WalkDir(root string, fn fs.WalkDirFunc) error
WalkDir walks the file tree rooted at root, calling walkFn for each file or directory in the tree, including root.
type File ¶
type File struct {
// contains filtered or unexported fields
}
File implements fs.File.
func (*File) WriteString ¶
WriteString writes a string to the object at key.
type FileInfo ¶
type FileInfo struct {
// contains filtered or unexported fields
}
FileInfo implements fs.FileInfo.
func (*FileInfo) Mode ¶
Mode returns the file mode bits from the object metadata. Returns 0 on parsing error.