Documentation
¶
Index ¶
- Constants
- Variables
- func CopyDir(srcFs FS, srcDirPath string, destFs FS, destDirPath string) error
- func CopyFile(srcFs FS, srcFilePath string, destFs FS, destFilePath string) error
- type Blob
- type Copier
- type FS
- type File
- type FileInfo
- type Initializer
- type Link
- type LinkOptions
- type Linker
- type ListOptions
- type Lister
- type MountPoint
- type Mover
- type OptLinker
- func (o *OptLinker) InternalUrl(ctx context.Context, name string, args ...LinkOptions) (res *Link, err error)
- func (o *OptLinker) PreSignedURL(ctx context.Context, name string, args ...LinkOptions) (res *Link, err error)
- func (o *OptLinker) PublicUrl(ctx context.Context, name string) (res *Link, err error)
- type TokenValidator
- type Vfs
- func (v *Vfs) Chmod(name string, mode os.FileMode) error
- func (v *Vfs) Chown(name string, uid, gid int) error
- func (v *Vfs) Chtimes(name string, atime time.Time, mtime time.Time) error
- func (v *Vfs) Create(name string) (File, error)
- func (v *Vfs) InternalUrl(ctx context.Context, name string, args ...LinkOptions) (*Link, error)
- func (v *Vfs) Mkdir(name string, perm os.FileMode) (err error)
- func (v *Vfs) MkdirAll(p string, perm os.FileMode) (err error)
- func (v *Vfs) Mount(prefix string, fsys FS) error
- func (v *Vfs) Mounts() []*MountPoint
- func (v *Vfs) Name() string
- func (v *Vfs) Open(name string) (f File, err error)
- func (v *Vfs) OpenFile(name string, flag int, perm os.FileMode) (f File, err error)
- func (v *Vfs) PreSignedURL(ctx context.Context, name string, args ...LinkOptions) (*Link, error)
- func (v *Vfs) PublicUrl(ctx context.Context, name string) (*Link, error)
- func (v *Vfs) Remove(name string) error
- func (v *Vfs) RemoveAll(path string) error
- func (v *Vfs) Rename(oldname, newname string) error
- func (v *Vfs) Stat(name string) (os.FileInfo, error)
- func (v *Vfs) Unmount(prefix string, fsys FS) error
Constants ¶
View Source
const (
Name = "vfs"
)
Variables ¶
View Source
var ( ErrRecursive = errors.New("recursive mount may cause dead lock") ErrNotSupported = errors.New("not supported") )
Functions ¶
Types ¶
type FileInfo ¶
type FileInfo struct {
// contains filtered or unexported fields
}
func NewFileInfo ¶
NewFileInfo create file info which implements os.FileInfo
type Initializer ¶
type LinkOptions ¶
type ListOptions ¶
type ListOptions struct { // Prefix indicates that only blobs with a key starting with this prefix // should be returned. Prefix string // Delimiter sets the delimiter used to define a hierarchical namespace, // like a filesystem with "directories". It is highly recommended that you // use "" or "/" as the Delimiter. Other values should work through this API, // but service UIs generally assume "/". // // An empty delimiter means that the bucket is treated as a single flat // namespace. // // A non-empty delimiter means that any result with the delimiter in its key // after Prefix is stripped will be returned with ListObject.IsDir = true, // ListObject.Key truncated after the delimiter, and zero values for other // ListObject fields. These results represent "directories". Multiple results // in a "directory" are returned as a single result. Delimiter string }
type MountPoint ¶
type MountPoint struct {
// contains filtered or unexported fields
}
A MountPoint represents a mounted file system.
func (*MountPoint) GetFS ¶
func (mp *MountPoint) GetFS() FS
func (*MountPoint) GetOpenCount ¶
func (mp *MountPoint) GetOpenCount() int32
func (*MountPoint) GetPrefix ¶
func (mp *MountPoint) GetPrefix() string
type OptLinker ¶
type OptLinker struct { FS // contains filtered or unexported fields }
OptLinker wrap FS as Linker
func NewOptLinker ¶
func (*OptLinker) InternalUrl ¶
func (*OptLinker) PreSignedURL ¶
type TokenValidator ¶
type Vfs ¶
type Vfs struct {
// contains filtered or unexported fields
}
func (*Vfs) InternalUrl ¶
func (*Vfs) Mount ¶
Mount mounts a filesystem with a provided prefix. Prefix can be any slash-separated path and does not have to represent an existing directory (in this respect it is similar to URL path). Mounted filesystem becomes available to os package.
func (*Vfs) Mounts ¶
func (v *Vfs) Mounts() []*MountPoint
func (*Vfs) PreSignedURL ¶
Click to show internal directories.
Click to hide internal directories.