fs

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

文件系统处理扩展,文件/目录操作

Index

Constants

View Source
const (
	V_EnvPath = "path"
)

Variables

This section is empty.

Functions

func AddEnvPath added in v0.3.0

func AddEnvPath(paths ...string) error

设置环境变量

func Append added in v0.5.0

func Append(filename, text string) error

文件尾部附加内容

func CheckDir added in v0.2.1

func CheckDir(dir string) string

检测目录,不存在则并创建 获取并返回标准目录

func Copy

func Copy(dstFile, srcFile string) (bool, error)

文件复制 基于读写

func CopyDir added in v0.3.1

func CopyDir(dst, src string)

全目录文件复制

func DelEnvPath added in v0.3.0

func DelEnvPath(paths ...string) error

删除环境变量

func EnvPath added in v0.3.0

func EnvPath() []string

获取项目路径

func ExistPath added in v0.5.0

func ExistPath(vpath string) bool

文件/文件等路径是否存在

func IsDir added in v0.3.0

func IsDir(dir string) bool

检测目录是否存在

func Put added in v0.5.1

func Put(filename, text string) error

文件覆盖

func StdDir added in v0.3.1

func StdDir(d string) string

获取标准目录

func StdPathName added in v0.5.1

func StdPathName(vpath string) string

获取标准的路径名称

Types

type FsReaderWriter

type FsReaderWriter struct {
	// contains filtered or unexported fields
}

不稳定,不建议使用 Fs 系统的文件读写接口尝试

func (*FsReaderWriter) Error

func (f *FsReaderWriter) Error() string

func (*FsReaderWriter) Read

func (f *FsReaderWriter) Read(p []byte) (n int, err error)

func (*FsReaderWriter) Write

func (f *FsReaderWriter) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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