file

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDir added in v1.2.0

func CheckDir(path string)

func GetAllFiles added in v1.2.0

func GetAllFiles(dirPth, fix string) (files []string, err error)

获取指定目录下的指定后缀的文件,不包含子目录下的文件

func GetFilesAndDirs added in v1.2.0

func GetFilesAndDirs(dirPth string) (files []string, dirs []string, err error)

获取指定目录下的所有文件和目录

func ReadFile

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

func WriteFile

func WriteFile(data []byte, path string, cover bool) error

WriteFile cover true 覆盖文件,false 检查是否已存在

Types

This section is empty.

Jump to

Keyboard shortcuts

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