vfscommons

package
v0.3.71 Latest Latest
Warning

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

Go to latest
Published: May 17, 2025 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SchemaFTP  = "ftp"
	SchemaSFTP = "sftp"
	SchemaOS   = "file"
)
View Source
const (
	PrefixUserHome  = "~"
	PrefixWorkspace = "*"
)

Variables

View Source
var (
	MissingConfigurationError  = errors.New("missing configuration")
	MismatchConfigurationError = errors.New("mismatch configuration")
	MissingConnectionError     = errors.New("missing connection")
	UnsupportedSchemaError     = errors.New("unsupported schema")
)

Functions

func Absolutize

func Absolutize(root, path string) string

func EnsureRelativePath

func EnsureRelativePath(path string) string

func ErrorContains

func ErrorContains(err error, text string) bool

func IsFile

func IsFile(path string) bool

func NewVfsFile

func NewVfsFile(absolutePath, root string, item interface{}) *gg_vfs.VfsFile

func ReadKey

func ReadKey(pathOrKey string) ([]byte, error)

func Relativize

func Relativize(root string, path string) string

func SplitHost

func SplitHost(settings *vfsoptions.VfsOptions) (host string, port int)

Types

type IVfs

type IVfs interface {
	IsConnected() bool
	Schema() string
	Path() string
	Options() (response map[string]interface{})
	Close()
	Cd(path string) (bool, error)
	Download(source, target string) ([]byte, error)
	gg_vfs.IVFSController
}

type IVfsBuilder

type IVfsBuilder func(opts any) (response IVfs, err error)

Jump to

Keyboard shortcuts

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