fileutil

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPathSepIfNeed

func AddPathSepIfNeed(path string) (newPath string)

func CreateDirRecursive

func CreateDirRecursive(filePath string) error

递归创建文件夹

func FileNameToJpgFileName

func FileNameToJpgFileName(onlyFilename string) string

func GetFilenameOnly

func GetFilenameOnly(fullfilename string) string

func IsFile

func IsFile(f string) (isFile bool, err error)

如果是单个文件则返回 true.

func IsFileExist

func IsFileExist(f string) bool

func IsFileNotExist

func IsFileNotExist(f string) bool

func IsImage

func IsImage(filename string) bool

func IsMediaFile

func IsMediaFile(filename string) bool

func IsVideo

func IsVideo(filename string) bool

func ReadFromFile

func ReadFromFile(filename string) (error, []byte)

func WriteToFile

func WriteToFile(filename string, content []byte, truncateIfExist bool) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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