FileTool

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendToFile

func AppendToFile(file, str string)

尾部插入字符串

func ChanReadLineFile

func ChanReadLineFile(readFileFrom string) chan string

func CopyEntireFile

func CopyEntireFile(from_path string, to_path string) (w int64, err error)

func CopyLineFile

func CopyLineFile(from_path string, to_path string)

func GetAbsolutePathOfRelativePath

func GetAbsolutePathOfRelativePath(FileName string) string

模糊查找相对路径下的文件

func GetDirAllSonFilePath

func GetDirAllSonFilePath(srcPath string) chan string

获取该文件路径下的所有文件

func GetFileAllLineString added in v0.1.2

func GetFileAllLineString(path string) (string, error)

获取按行文件所有内容

func IsDir

func IsDir(path string) bool

func IsFile

func IsFile(path string) bool

func MkFileNotDir

func MkFileNotDir(path string)

创建file不存在的dir

func PathExists

func PathExists(path string) (bool, error)

判断所给路径文件/文件夹是否存在

func ReadLineFile

func ReadLineFile(readFileFrom string) chan string

func ReadWholeFile

func ReadWholeFile(readFileFrom string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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