internal

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Default added in v0.1.2

func Default(a, b string) string

func FileCopy added in v0.2.10

func FileCopy(dest, source string) error

func FileGetContents added in v0.2.10

func FileGetContents(filename string) (string, error)

file_get_contents()

func FileLineNum added in v0.2.10

func FileLineNum(path string) (num int, err error)

FileLineNum 获取文件行数

func FilePutContents added in v0.2.10

func FilePutContents(filename, data string, mode os.FileMode) error

file_put_contents()

func FileScan added in v0.2.10

func FileScan(path string, f func(b []byte, line int) bool, maxLineLen ...int) error

逐行扫描文件,回调返回当前内容及当前行号

func IsWritable added in v0.2.10

func IsWritable(path string) (isWritable bool, err error)

IsWritable 目录是否可写

func Pathinfo added in v0.2.10

func Pathinfo(path string, options int) map[string]string

pathinfo() -1: all; 1: dirname; 2: basename; 4: extension; 8: filename Usage: Pathinfo("/home/go/path/src/php2go/php2go.go", 1|2|4|8)

func ScanDir added in v0.2.10

func ScanDir(path string) ([]string, error)

func Set added in v0.2.7

func Set(data ...string) map[string]struct{}
func Unlink(filename string) error

unlink()

Types

This section is empty.

Directories

Path Synopsis
writer
rotate/file-rotatelogs
package rotatelogs is a port of File-RotateLogs from Perl (https://metacpan.org/release/File-RotateLogs), and it allows you to automatically rotate output files when you write to them according to the filename pattern that you can specify.
package rotatelogs is a port of File-RotateLogs from Perl (https://metacpan.org/release/File-RotateLogs), and it allows you to automatically rotate output files when you write to them according to the filename pattern that you can specify.

Jump to

Keyboard shortcuts

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