filedir

package
v0.0.0-...-6d34543 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: MIT Imports: 5 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

func EsimRecoverFile(recoverFile string) error

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

func EsimWrite

func EsimWrite(filePath, content string) error

func GetCurrentDir

func GetCurrentDir() string

func GetGoProPath

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

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

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

func RemoveDir

func RemoveDir(dir string) error

Types

type ErrWrite

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

func (*ErrWrite) Write

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

type EsimWriter

type EsimWriter struct{}

func (*EsimWriter) Write

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

type IfaceWriter

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

func NewErrWrite

func NewErrWrite(nilNum int) IfaceWriter

func NewEsimWriter

func NewEsimWriter() IfaceWriter

func NewNullWrite

func NewNullWrite() IfaceWriter

type NullWrite

type NullWrite struct{}

func (*NullWrite) Write

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