base

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FileNameList []string

Functions

func AppendToFile

func AppendToFile(path string, content string)

*

  • 追加内容到文件中

func CheckDir

func CheckDir(path string) bool

*

  • 检查文件夹是否存在

func CheckFile

func CheckFile(path string) bool

*

  • 检查文件是否存在

func CreateDir

func CreateDir(path string) bool

*

  • 新建文件夹

func CreateFile

func CreateFile(path string) bool

*

  • 新建文件

func DelDir

func DelDir(path string) bool

*

  • 删除文件夹

func DelFile

func DelFile(path string) bool

*

  • 删除文件

func GetFileList

func GetFileList(path string) []os.FileInfo

*

  • 获取文件夹下文件列表

func GetTreeDir

func GetTreeDir(fpath string)

*

  • 获取目录所有文件

func InitDir

func InitDir(path string)

*

  • 初始化文件夹

func InitFile

func InitFile(path string)

*

  • 初始化存储文件

func NowTime

func NowTime() [3]string

*

  • 获取当前时间 ["23","05","40"]

func ReadFile

func ReadFile(path string) string

*

  • 读取文件所有内容

func WriteFile

func WriteFile(path string, info string) bool

*

  • 写入文件内容(快速)

Types

This section is empty.

Jump to

Keyboard shortcuts

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