Versions in this module Expand all Collapse all v1 v1.13.0 Aug 28, 2024 v1.11.1 Aug 28, 2024 Changes in this version + var ErrEmptyObjectName = errors.New("storage: object name is empty") + var ErrFileClosed = errors.New("file is closed") + var ErrFileNotFound = syscall.ENOENT + var ErrNoBucketInName = errors.New("no bucket name found in the name") + var ErrObjectDoesNotExist = errors.New("storage: object doesn't exist") + var ErrOutOfRange = errors.New("out of range") + func NewGcsFS(ctx context.Context, opts ...option.ClientOption) (afero.Fs, error) + func NewGcsFSFromClient(ctx context.Context, client *storage.Client) (afero.Fs, error) + func NewGcsFSFromClientWithSeparator(ctx context.Context, client *storage.Client, folderSeparator string) (afero.Fs, error) + func NewGcsFSWithSeparator(ctx context.Context, folderSeparator string, opts ...option.ClientOption) (afero.Fs, error) + type ByName []*FileInfo + func (a ByName) Len() int + func (a ByName) Less(i, j int) bool + func (a ByName) Swap(i, j int) + type FileInfo struct + func (fi *FileInfo) IsDir() bool + func (fi *FileInfo) ModTime() time.Time + func (fi *FileInfo) Mode() os.FileMode + func (fi *FileInfo) Name() string + func (fi *FileInfo) Size() int64 + func (fi *FileInfo) Sys() interface{} + type Fs struct + func NewGcsFs(ctx context.Context, client stiface.Client) *Fs + func NewGcsFsWithSeparator(ctx context.Context, client stiface.Client, folderSep string) *Fs + func (fs *Fs) Chmod(_ string, _ os.FileMode) error + func (fs *Fs) Chown(_ string, _, _ int) error + func (fs *Fs) Chtimes(_ string, _, _ time.Time) error + func (fs *Fs) Create(name string) (*GcsFile, error) + func (fs *Fs) Mkdir(name string, _ os.FileMode) error + func (fs *Fs) MkdirAll(path string, perm os.FileMode) error + func (fs *Fs) Name() string + func (fs *Fs) Open(name string) (*GcsFile, error) + func (fs *Fs) OpenFile(name string, flag int, fileMode os.FileMode) (*GcsFile, error) + func (fs *Fs) Remove(name string) error + func (fs *Fs) RemoveAll(path string) error + func (fs *Fs) Rename(oldName, newName string) error + func (fs *Fs) Stat(name string) (os.FileInfo, error) + type GcsFile struct + ReadDirIt stiface.ObjectIterator + func NewGcsFile(ctx context.Context, fs *Fs, obj stiface.ObjectHandle, openFlags int, ...) *GcsFile + func NewGcsFileFromOldFH(openFlags int, fileMode os.FileMode, oldFile *gcsFileResource) *GcsFile + func (o *GcsFile) Close() error + func (o *GcsFile) Name() string + func (o *GcsFile) Read(p []byte) (n int, err error) + func (o *GcsFile) ReadAt(p []byte, off int64) (n int, err error) + func (o *GcsFile) Readdir(count int) ([]os.FileInfo, error) + func (o *GcsFile) Readdirnames(n int) ([]string, error) + func (o *GcsFile) Seek(newOffset int64, whence int) (int64, error) + func (o *GcsFile) Stat() (os.FileInfo, error) + func (o *GcsFile) Sync() error + func (o *GcsFile) Truncate(wantedSize int64) error + func (o *GcsFile) Write(p []byte) (n int, err error) + func (o *GcsFile) WriteAt(b []byte, off int64) (n int, err error) + func (o *GcsFile) WriteString(s string) (ret int, err error) + type GcsFs struct + func (fs *GcsFs) Chmod(name string, mode os.FileMode) error + func (fs *GcsFs) Chown(name string, uid, gid int) error + func (fs *GcsFs) Chtimes(name string, atime time.Time, mtime time.Time) error + func (fs *GcsFs) Create(name string) (afero.File, error) + func (fs *GcsFs) Mkdir(name string, perm os.FileMode) error + func (fs *GcsFs) MkdirAll(path string, perm os.FileMode) error + func (fs *GcsFs) Name() string + func (fs *GcsFs) Open(name string) (afero.File, error) + func (fs *GcsFs) OpenFile(name string, flag int, perm os.FileMode) (afero.File, error) + func (fs *GcsFs) Remove(name string) error + func (fs *GcsFs) RemoveAll(path string) error + func (fs *GcsFs) Rename(oldname, newname string) error + func (fs *GcsFs) Stat(name string) (os.FileInfo, error)