backends

package
v0.0.0-...-2918666 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2014 License: MIT Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileInfo

type FileInfo interface {
	Path() string
	IsDir() bool
	Name() string // return only file name

}

type FileStore

type FileStore interface {
	// write content at given path
	WriteFile(path string, reader io.Reader) (err error)

	// create dir at given path
	CreateDir(path string) (err error)

	// generate a checksum for a given path (file or directory)
	Checksum(path string) (err error)

	// read content of file at given path
	ReadFile(path string) (reader io.Reader, err error)

	// list direct paths in root dir
	ReadRoot() (list []FileInfo, err error)

	// list direct child paths within dir at path
	ReadDir(path string) (list []FileInfo, err error)

	// list direct and indirect childs within dir at given path for a given depth
	// depth -1 means unlimited depth
	ReadDirTree(path string, depth int) (paths []FileInfo, err error)

	// move file or dir at given path
	Move(path string, newPath string) (err error)

	// delete file or dir at given path
	Delete(path string) (err error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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