fileutils

package
v1.4.108 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: MulanPSL-2.0 Imports: 14 Imported by: 50

Documentation

Index

Constants

View Source
const FILE_GOMOD = "go.mod"

Variables

This section is empty.

Functions

func CheckConfigFileExist

func CheckConfigFileExist(root, f string) bool

func CheckFileExist

func CheckFileExist(filename string) bool

func Dir added in v1.0.405

func Dir(pathfile string) string

func FileNameOfPath added in v1.2.91

func FileNameOfPath(pathfile string) string

func FindAllDirs added in v1.3.13

func FindAllDirs(dirPath string) ([]string, error)

func FindDirs added in v1.3.13

func FindDirs(rootdir string) ([]string, error)

func FindRootDir

func FindRootDir() string

func FindRootDirGoMod added in v1.0.60

func FindRootDirGoMod() string

func FindRootPkg added in v1.0.112

func FindRootPkg() string

func GetCurPath

func GetCurPath() string

func GetPkg added in v1.0.112

func GetPkg(pkgPath string) (*build.Package, error)

func GetPkgAllFilesPath added in v1.0.91

func GetPkgAllFilesPath(pkgPath string) ([]string, error)

获取第三方包下所有文件的相对路径

func GetPkgPath added in v1.0.91

func GetPkgPath(pkgPath string) (string, error)

func ImportPkg added in v1.3.7

func ImportPkg(pkgpath string) (*build.Package, error)

func ImportPkgDir added in v1.3.7

func ImportPkgDir(pkgpath string) (string, error)

func LoadGofileUtil added in v1.3.9

func LoadGofileUtil() baseiface.ISingleton

func ReadFileToString added in v1.2.5

func ReadFileToString(file string) (string, error)

func ReadSubDirs added in v1.0.602

func ReadSubDirs(rootPath string) ([]string, error)

func SetRootPkgEnv added in v1.0.112

func SetRootPkgEnv(p string)

func TryFileExist

func TryFileExist(filename string) bool

func UnZip

func UnZip(zipFile string, destPath string) error

func WriteBytesFile added in v1.2.5

func WriteBytesFile(filename string, bytes []byte) error

func Zip

func Zip(srcPath string, destFile string) error

Types

type GofileUtil added in v1.3.9

type GofileUtil struct {
	basedto.BaseEntitySingle
}

func FindBeanGofileUtil added in v1.3.9

func FindBeanGofileUtil() *GofileUtil

func NewGofileUtil added in v1.3.9

func NewGofileUtil() *GofileUtil

func (*GofileUtil) CheckConfigFileExist added in v1.3.9

func (this *GofileUtil) CheckConfigFileExist(root, f string) bool

func (*GofileUtil) CheckFileExist added in v1.3.9

func (this *GofileUtil) CheckFileExist(filename string) bool

func (*GofileUtil) Dir added in v1.3.9

func (this *GofileUtil) Dir(pathfile string) string

func (*GofileUtil) FindPkgPath added in v1.3.9

func (this *GofileUtil) FindPkgPath(pkg string) string

func (*GofileUtil) FindRootDir added in v1.3.9

func (this *GofileUtil) FindRootDir() string

func (*GofileUtil) FindRootDirGoMod added in v1.3.9

func (this *GofileUtil) FindRootDirGoMod() string

func (*GofileUtil) FindRootPkg added in v1.3.9

func (this *GofileUtil) FindRootPkg() string

func (*GofileUtil) GetCurPath added in v1.3.9

func (this *GofileUtil) GetCurPath() string

func (*GofileUtil) SetRootPkgEnv added in v1.3.9

func (this *GofileUtil) SetRootPkgEnv(p string)

func (*GofileUtil) TryFileExist added in v1.3.9

func (this *GofileUtil) TryFileExist(filename string) bool

func (*GofileUtil) UnZip added in v1.3.9

func (this *GofileUtil) UnZip(zipFile string, destPath string) error

func (*GofileUtil) Zip added in v1.3.9

func (this *GofileUtil) Zip(srcPath string, destFile string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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