file

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs

func Abs(p string) string

Abs 获取绝对路径

func Create

func Create(p string)

Create 创建文件

func Delete

func Delete(p string)

Delete 删除文件或目录

func Dir

func Dir(p string) string

Dir 获取目录

func Each

func Each(dir string, includeChild bool, action func(string))

Each 遍历目录

func Exists

func Exists(p string) os.FileInfo

Exists 存在

func Ext

func Ext(p string) string

Ext 获取扩展名

func FormatJSON

func FormatJSON(jsonStr string) string

FormatJSON 格式化 JSON 字符串

func LoadJSONFile

func LoadJSONFile(v interface{}, p string)

LoadJSONFile 加载 JSON 文件

func Mkdir

func Mkdir(p string)

Mkdir 创建目录

func Name

func Name(p string) string

Name 获取名称

func NameNotExt

func NameNotExt(p string) string

NameNotExt 获取名称,不包含扩展名

func ReadFile

func ReadFile(p string) string

ReadFile 读取文件

func ReadLine

func ReadLine(p string, action func(string))

ReadLine 逐行读取文件

func SaveFile

func SaveFile(data, p string)

SaveFile 保存文件

func SaveJSONFile

func SaveJSONFile(v interface{}, p string)

SaveJSONFile 保存 JSON 文件

Types

This section is empty.

Jump to

Keyboard shortcuts

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