fs

package
v0.0.0-...-ef20d85 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exec

func Exec(timeout time.Duration, cmdStr string, args ...string) cmd.Status

func MkDir

func MkDir(relativePath string) error
func base.AbsPath(relativePath string) (string, error) {
	return filepath.Abs(filepath.Join(base.Config.Fs.Root, relativePath))
}

func Read

func Read(srcPath string, dst io.Writer) (int64, error)

func Remove

func Remove(relativePath string) error

func ResizeImage

func ResizeImage(filePath string, crop []int, sizes [][]int) ([]string, error)

func Write

func Write(src io.Reader, collection, fileName string, size int64) (rpath string, written int64, err error)

func ZipRead

func ZipRead(zipFile, zipEntry string) ([]byte, error)

Types

type FileInfo

type FileInfo struct {
	Name     string
	Size     int64
	Mode     os.FileMode
	ModeTime time.Time
	IsDir    bool
	RawName  string
}

func Ls

func Ls(relativePath string) ([]*FileInfo, error)

func NewFileInfo

func NewFileInfo(info os.FileInfo) *FileInfo

func Stat

func Stat(relativePath string) (*FileInfo, error)

Jump to

Keyboard shortcuts

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