file

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: Apache-2.0 Imports: 5 Imported by: 2

README

file

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendFile added in v0.6.0

func AppendFile(filePath string, text string) bool

func AppendFileBytes added in v0.6.0

func AppendFileBytes(filePath string, data []byte) bool

func ChangeFileExt added in v1.0.2

func ChangeFileExt(filePath string, ext string) string

func Child added in v1.3.0

func Child(filePath string) ([]os.DirEntry, error)

func CopyFile added in v0.6.0

func CopyFile(srcFilePath string, destFilePath string) bool

func CreateFile added in v1.3.0

func CreateFile(filePath string) bool

func DeleteDirs

func DeleteDirs(path string) bool

func DeleteFile

func DeleteFile(filePath string) bool

func DirectoryExists

func DirectoryExists(dirPath string) bool

func ExtractFileExt added in v1.0.2

func ExtractFileExt(filePath string) string

func ExtractFileName added in v1.0.2

func ExtractFileName(filePath string) string

func ExtractFilePath added in v1.0.2

func ExtractFilePath(filePath string) string

func FileExists

func FileExists(filePath string) bool

func MkDirs

func MkDirs(path string) bool

func ReadFile

func ReadFile(filePath string) string

func ReadFileBytes

func ReadFileBytes(filePath string) []byte

func ReadFileLines added in v0.6.0

func ReadFileLines(filePath string) []string

func RenameFile added in v0.6.0

func RenameFile(srcFilePath string, destFilePath string) bool

func Size added in v1.3.0

func Size(filePath string) int64

Size 返回文件/目录的大小

func SizeFormat added in v1.3.0

func SizeFormat(filePath string) string

SizeFormat 返回文件/目录的可读大小

func SizeList added in v1.3.0

func SizeList(filePaths []string) int64

func Sizes added in v1.3.0

func Sizes(filePaths ...string) int64

func WriteFile

func WriteFile(filePath string, text string) bool

func WriteFileBytes

func WriteFileBytes(filePath string, data []byte) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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