fs

package
v1.0.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2024 License: Apache-2.0 Imports: 25 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGCSFS

func NewGCSFS(ctx context.Context, bucket string, conn connection.GCSConnection) (*gcsFS, error)

func NewLocalFS

func NewLocalFS(base string) *localFS

func NewS3FS

func NewS3FS(ctx context.Context, bucket string, conn connection.S3Connection) (*s3FS, error)

func NewSMBFS

func NewSMBFS(server string, port, share string, auth types.Authentication) (*smbFS, error)

func NewSSHFS

func NewSSHFS(host, user, password string) (*sshFS, error)

Types

type FileInfo

type FileInfo interface {
	os.FileInfo
	FullPath() string
}

FileInfo is a wrapper for os.FileInfo that also returns the full path of the file.

FullPath is required to support globs with ReadDir()

type Filesystem

type Filesystem interface {
	Close() error
	ReadDir(name string) ([]FileInfo, error)
	Stat(name string) (os.FileInfo, error)
}

type FilesystemRW

type FilesystemRW interface {
	Filesystem
	Read(ctx gocontext.Context, path string) (io.ReadCloser, error)
	Write(ctx gocontext.Context, path string, data io.Reader) (os.FileInfo, error)
}

type ListItemLimiter

type ListItemLimiter interface {
	SetMaxListItems(maxList int)
}

type SMBFileInfo added in v1.0.16

type SMBFileInfo struct {
	Base string
	fs.FileInfo
}

func (*SMBFileInfo) FullPath added in v1.0.16

func (t *SMBFileInfo) FullPath() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL