file

package
v0.2.52 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDirList added in v0.2.50

func GetDirList(dir string, fun func(path string) bool) error

GetDirList 获取目标文件夹下的所有文件(包含子目录)

func If added in v0.2.50

func If(condition bool, trueVal, falseVal string) string

func Read added in v0.2.41

func Read(path string) ([]byte, error)

Read 一次性读取

func ReadLine added in v0.2.41

func ReadLine(path string, callback func(line []byte)) error

ReadLine 逐行读取

func ReadLineChunk added in v0.2.44

func ReadLineChunk(path string, offset int, size int, callback func(list []string)) error

func ReadLineWithBreak added in v0.2.51

func ReadLineWithBreak(path string, callback func(line []byte) bool) error

ReadLineWithBreak 逐行读取可退出

func ReadLineWithCxt added in v0.2.49

func ReadLineWithCxt(cxt context.Context, path string, callback func(line []byte)) error

func Write added in v0.2.41

func Write(path string, content []byte) error

Write 覆盖写

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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