filedir

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDir

func CreateDir(dir string) error

func CreateFile

func CreateFile(file string) (bool, error)

func EsimBackUpFile

func EsimBackUpFile(backFile string) error

BackUpFile backup files to os.Getenv("GOPATH") + "/pkg/esim/backup/". backFile is Absolute path. Overwrite as soon as the file exists.

func EsimRecoverFile added in v0.0.5

func EsimRecoverFile(recoverFile string) error

EsimRecoverFile recover file from os.Getenv("GOPATH") + "/pkg/esim/backup/".

func EsimWrite added in v0.0.2

func EsimWrite(filePath, content string) error

func GetCurrentDir

func GetCurrentDir() string

func GetGoProPath added in v0.0.5

func GetGoProPath() string

func GetParDir

func GetParDir() string

func IsEmptyDir

func IsEmptyDir(dir string) (bool, error)

func IsExistsDir

func IsExistsDir(dir string) (bool, error)

func IsExistsFile

func IsExistsFile(file string) (bool, error)

func ReadDir added in v0.1.1

func ReadDir(dirname string) ([]string, error)

ReadDir read directory recursively by dirname and returns list of directory (not include dirname).

func RemoveDir added in v0.0.2

func RemoveDir(dir string) error

Types

type ErrWrite added in v0.0.5

type ErrWrite struct {
	// contains filtered or unexported fields
}

ErrWrite for write errors.

func (*ErrWrite) Write added in v0.0.5

func (er *ErrWrite) Write(outFile, content string) error

type EsimWriter added in v0.0.5

type EsimWriter struct{}

func (*EsimWriter) Write added in v0.0.5

func (ew *EsimWriter) Write(outFile, content string) error

type IfaceWriter added in v0.0.5

type IfaceWriter interface {
	Write(outFile, content string) error
}

func NewErrWrite added in v0.0.5

func NewErrWrite(nilNum int) IfaceWriter

func NewEsimWriter added in v0.0.5

func NewEsimWriter() IfaceWriter

func NewNullWrite added in v0.0.5

func NewNullWrite() IfaceWriter

type NullWrite added in v0.0.5

type NullWrite struct{}

func (*NullWrite) Write added in v0.0.5

func (nw *NullWrite) Write(outFile, content string) error

Jump to

Keyboard shortcuts

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