fileutil

package
v0.0.0-...-29c100b Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// 默认的文件权限
	DefaultFileMode os.FileMode = 0644

	// linux下需加上O_WRONLY或是O_RDWR
	DefaultFileFlag int = os.O_APPEND | os.O_CREATE | os.O_WRONLY
)

Functions

func ChangeFileExt

func ChangeFileExt(filename, newExt string) string

func DirExists

func DirExists(dir string) bool

func FileExists

func FileExists(dir string) bool

func OpenFile

func OpenFile(pathfile string, fileflag int, filemode os.FileMode) (wc *os.File, err error)

构建一个每日写日志文件的写入器

func PathJoin

func PathJoin(dir, filename string) string

func TransPath

func TransPath(path string) string

将路径转成统一使用的路径格式

Types

This section is empty.

Jump to

Keyboard shortcuts

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