util

package
v1.67.4 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: BSD-3-Clause Imports: 6 Imported by: 5 modules, 6 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package util util chain33基础功能函数实现

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckFileExists

func CheckFileExists(fileName string) (bool, error)

CheckFileExists : check file exists or not

func CheckFileIsExist

func CheckFileIsExist(filename string) bool

CheckFileIsExist : check whether the file exists or not

func CheckPathExisted

func CheckPathExisted(path string) bool

CheckPathExisted : check the path exists or not

func CopyFile

func CopyFile(srcFile, dstFile string) (written int64, err error)

CopyFile : copy file

func DeleteFile

func DeleteFile(fileName string) error

DeleteFile : delete the file

func DirEmpty

func DirEmpty(path string) (bool, error)

DirEmpty : DirEmpty

func DirExists

func DirExists(path string) (bool, error)

DirExists : 检查文件夹是否存在

func MakeDir

func MakeDir(path string) error

MakeDir : MakeDir

func OpenFile

func OpenFile(fileName string) (*os.File, error)

OpenFile : OpenFile

func Pwd

func Pwd() string

Pwd : Pwd

func ReadFile

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

ReadFile : read file

func WriteStringToFile

func WriteStringToFile(file, content string) (writeLen int, err error)

WriteStringToFile : write content to file

Types

This section is empty.

Jump to

Keyboard shortcuts

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