file

package
v0.0.0-...-2083224 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearDir

func ClearDir(dir string) bool

ClearDir 清空dir下所有的文件和文件夹 RemoveAll会清空本文件夹, 所以还要创建之

func CopyDir

func CopyDir(source string, dest string) (err error)

CopyDir cp dir

func CopyFile

func CopyFile(srcName, dstName string) (written int64, err error)

CopyFile cp file

func DeleteFile

func DeleteFile(path string) bool

DeleteFile delete file

func GetCurrentDirectory

func GetCurrentDirectory() string

GetCurrentDirectory get current directory

func GetFileStrContent

func GetFileStrContent(path string) string

GetFileStrContent 获得文件str内容

func GetFilename

func GetFilename(path string) string

GetFilename get file name

func GetFilesize

func GetFilesize(path string) int64

GetFilesize get file size length in bytes

func GetParentDirectory

func GetParentDirectory(dirctory string) string

GetParentDirectory get parent directory

func IsDirExists

func IsDirExists(path string) bool

IsDirExists check if dir is exist

func IsFileExist

func IsFileExist(filename string) bool

IsFileExist check file is exist

func ListDir

func ListDir(dir string) []string

ListDir list dir's all file, return filenames

func MkdirAll

func MkdirAll(dir string) bool

MkdirAll 创建文件夹

func PutFileStrContent

func PutFileStrContent(path, content string) bool

PutFileStrContent 写入string内容

func SplitFilename

func SplitFilename(filename string) (baseName, ext string)

SplitFilename 分离文件名与扩展名(包含.)

func Substr

func Substr(s string, pos, length int) string

Substr golang substr

func TransferExt

func TransferExt(path string, toExt string) string

TransferExt 转换文件的格式 toExt包含.

Types

This section is empty.

Jump to

Keyboard shortcuts

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