file

package
v0.2.54 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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