driver

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver interface {
	// DriverName return driver name
	DriverName() string
	// Connect connects the server
	Connect() error
	// MkdirAll creates a directory named path
	MkdirAll(path string) error
	// Create creates the named file
	Create(path string) (err error)
	// Symlink create a symbolic link
	Symlink(oldname, newname string) error
	// Remove removes the specified file or directory
	Remove(path string) error
	// Rename renames a file
	Rename(oldPath, newPath string) error
	// Chtimes changes the access and modification times of the named file
	Chtimes(path string, aTime time.Time, mTime time.Time) error
	// WalkDir walks the file tree rooted at root, calling fn for each file or directory in the tree, including root
	WalkDir(root string, fn fs.WalkDirFunc) error
	// Open opens the named file for reading
	Open(path string) (f http.File, err error)
	// Stat returns the fs.FileInfo describing the named file, if path is a symbolic link, read the real file
	Stat(path string) (fi fs.FileInfo, err error)
	// Lstat returns the fs.FileInfo describing the named file, if path is a symbolic link, read the symbolic link info
	Lstat(path string) (fi fs.FileInfo, err error)
	// GetFileTime get the creation time, last access time, last modify time of the path
	GetFileTime(path string) (cTime time.Time, aTime time.Time, mTime time.Time, err error)
	// Write write src file to dest file
	Write(src string, dest string) error
	// ReadLink returns the destination of the named symbolic link
	ReadLink(path string) (string, error)
}

Driver a data source client driver

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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