pkg

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(src string, dst string) error

func CreateFile

func CreateFile(filename string, src ...io.Reader) error

CreateFile

func DeleteFile added in v0.1.9

func DeleteFile(filename string, delDir bool) error

DeleteFile delete file

func Dir

func Dir(filename string) string

func Exists

func Exists(path string) bool

Exists

func Ext

func Ext(path string) string

func Filename added in v0.2.0

func Filename(path string) string

Filename 获取指定文件路径的文件名称

func GetFileContent

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

func IsDir

func IsDir(path string) bool

IsDir

func Lower added in v0.2.0

func Lower(s string) string

func LowerFirst added in v0.2.0

func LowerFirst(s string) string

LowerFirst 字符串首字母转换为小写

func Mkdir

func Mkdir(fpath string) error

Mkdir

func Move added in v0.2.0

func Move(src string, dst string) error

Move 文件移动/重命名

func NewFile

func NewFile(filename string) (*os.File, error)

NewFile

func RandomString

func RandomString(length int) string

func Rename added in v0.2.0

func Rename(src string, dst string) error

Rename 文件移动/重命名

func TempDir added in v0.2.0

func TempDir() string

TempDir 系统临时目录

func Truncate

func Truncate(path string, size int) error

Truncate changes the size of the named file.

func UpperFirst added in v0.2.0

func UpperFirst(s string) string

UpperFirst 字符串首字母转换为大写

func WriteFile

func WriteFile(path string, content []byte) error

WriteFile (文本)写入文件内容

Types

type Empty

type Empty struct{}

Empty

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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