Documentation ¶
Index ¶
- func FileExists(filename string) bool
- func FolderExists(filename string) bool
- func IsNotFoundError(err error) bool
- type DummyDirEntry
- type FileGetOptions
- type FilePutOptions
- type FileStatOptions
- type FileSystem
- type FolderCreateOptions
- type LocalDirEntry
- type LocalFs
- func (lfs *LocalFs) FileExists(folder, name string) (bool, error)
- func (lfs *LocalFs) FileGet(folder, name string, opts FileGetOptions) ([]byte, error)
- func (lfs *LocalFs) FileList(folder, name string) ([]fs.DirEntry, error)
- func (lfs *LocalFs) FileOpenRead(folder, name string, opts FileGetOptions) (io.ReadCloser, string, error)
- func (lfs *LocalFs) FilePut(folder, name string, data []byte, opts FilePutOptions) error
- func (lfs *LocalFs) FileRead(folder, name string, w io.Writer, size int64, opts FileGetOptions) error
- func (lfs *LocalFs) FileStat(folder, name string, opts FileStatOptions) (os.FileInfo, error)
- func (lfs *LocalFs) FileWrite(folder, name string, r io.Reader, size int64, opts FilePutOptions) error
- func (lfs *LocalFs) FolderCreate(folder string, opts FolderCreateOptions) error
- func (lfs *LocalFs) FolderExists(folder string) (bool, error)
- func (lfs *LocalFs) Protocol() string
- func (lfs *LocalFs) String() string
- type NotFoundError
- type S3DirEntry
- type S3FileInfo
- type S3Fs
- func (fs *S3Fs) FileExists(folder, name string) (bool, error)
- func (fs *S3Fs) FileGet(folder, name string, opts FileGetOptions) ([]byte, error)
- func (fs *S3Fs) FileList(folder, name string) ([]os.DirEntry, error)
- func (fs *S3Fs) FileOpenRead(folder, name string, opts FileGetOptions) (io.ReadCloser, string, error)
- func (fs *S3Fs) FilePut(folder, name string, data []byte, opts FilePutOptions) error
- func (fs *S3Fs) FileRead(folder, name string, w io.Writer, size int64, opts FileGetOptions) error
- func (fs *S3Fs) FileStat(folder, name string, opts FileStatOptions) (os.FileInfo, error)
- func (fs *S3Fs) FileWrite(folder, name string, r io.Reader, size int64, opts FilePutOptions) error
- func (fs *S3Fs) FolderCreate(folder string, opts FolderCreateOptions) error
- func (fs *S3Fs) FolderExists(folder string) (bool, error)
- func (fs *S3Fs) Protocol() string
- func (fs *S3Fs) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileExists ¶
func FolderExists ¶
func IsNotFoundError ¶
Types ¶
type DummyDirEntry ¶
type DummyDirEntry struct {
// contains filtered or unexported fields
}
func NewDummyDirEntry ¶
func NewDummyDirEntry(name string) *DummyDirEntry
func (DummyDirEntry) IsDir ¶
func (sdi DummyDirEntry) IsDir() bool
func (DummyDirEntry) Name ¶
func (sdi DummyDirEntry) Name() string
func (DummyDirEntry) Type ¶
func (sdi DummyDirEntry) Type() os.FileMode
type FileGetOptions ¶
type FileGetOptions struct {
VersionID string
}
FileGetOptions GetObjectOptions represents options specified by user for GetObject call
type FilePutOptions ¶
FilePutOptions PutObjectOptions represents options specified by user for PutObject call
type FileStatOptions ¶
type FileStatOptions struct { }
type FileSystem ¶
type FileSystem interface { FolderExists(folder string) (bool, error) FolderCreate(folder string, opts FolderCreateOptions) error FileExists(folder, name string) (bool, error) FileGet(folder, name string, opts FileGetOptions) ([]byte, error) FilePut(folder, name string, data []byte, opts FilePutOptions) error FileWrite(folder, name string, r io.Reader, size int64, opts FilePutOptions) error FileRead(folder, name string, w io.Writer, size int64, opts FileGetOptions) error FileOpenRead(folder, name string, opts FileGetOptions) (io.ReadCloser, string, error) FileStat(folder, name string, opts FileStatOptions) (fs.FileInfo, error) FileList(folder, name string) ([]fs.DirEntry, error) String() string Protocol() string }
type FolderCreateOptions ¶
type FolderCreateOptions struct {
ObjectLocking bool
}
type LocalDirEntry ¶
func (LocalDirEntry) IsDir ¶
func (lde LocalDirEntry) IsDir() bool
func (LocalDirEntry) Name ¶
func (lde LocalDirEntry) Name() string
func (LocalDirEntry) Type ¶
func (lde LocalDirEntry) Type() os.FileMode
type LocalFs ¶
type LocalFs struct {
// contains filtered or unexported fields
}
func (*LocalFs) FileGet ¶
func (lfs *LocalFs) FileGet(folder, name string, opts FileGetOptions) ([]byte, error)
func (*LocalFs) FileOpenRead ¶
func (lfs *LocalFs) FileOpenRead(folder, name string, opts FileGetOptions) (io.ReadCloser, string, error)
func (*LocalFs) FilePut ¶
func (lfs *LocalFs) FilePut(folder, name string, data []byte, opts FilePutOptions) error
func (*LocalFs) FolderCreate ¶
func (lfs *LocalFs) FolderCreate(folder string, opts FolderCreateOptions) error
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
func (*NotFoundError) Error ¶
func (nf *NotFoundError) Error() string
type S3DirEntry ¶
type S3DirEntry struct {
S3FileInfo
}
func (S3DirEntry) IsDir ¶
func (sdi S3DirEntry) IsDir() bool
func (S3DirEntry) Name ¶
func (sdi S3DirEntry) Name() string
func (S3DirEntry) Type ¶
func (sdi S3DirEntry) Type() os.FileMode
type S3FileInfo ¶
type S3FileInfo struct {
// contains filtered or unexported fields
}
S3FileInfo A FileInfo describes a file and is returned by Stat and Lstat.
func NewS3FileInfo ¶
func NewS3FileInfo(bucket, name string, info minio.ObjectInfo) *S3FileInfo
func (*S3FileInfo) IsDir ¶
func (sfi *S3FileInfo) IsDir() bool
func (*S3FileInfo) ModTime ¶
func (sfi *S3FileInfo) ModTime() time.Time
func (*S3FileInfo) Mode ¶
func (sfi *S3FileInfo) Mode() os.FileMode
func (*S3FileInfo) Name ¶
func (sfi *S3FileInfo) Name() string
func (*S3FileInfo) Size ¶
func (sfi *S3FileInfo) Size() int64
func (*S3FileInfo) Sys ¶
func (sfi *S3FileInfo) Sys() interface{}
type S3Fs ¶
type S3Fs struct {
// contains filtered or unexported fields
}
func (*S3Fs) FileGet ¶
func (fs *S3Fs) FileGet(folder, name string, opts FileGetOptions) ([]byte, error)
func (*S3Fs) FileOpenRead ¶
func (fs *S3Fs) FileOpenRead(folder, name string, opts FileGetOptions) (io.ReadCloser, string, error)
func (*S3Fs) FilePut ¶
func (fs *S3Fs) FilePut(folder, name string, data []byte, opts FilePutOptions) error
func (*S3Fs) FolderCreate ¶
func (fs *S3Fs) FolderCreate(folder string, opts FolderCreateOptions) error
Click to show internal directories.
Click to hide internal directories.