Documentation ¶
Index ¶
- Variables
- func Bytes2GB(bytes int64) float64
- func Bytes2MByes(bytes int64) float64
- func BytesToString(bytes int64) string
- func CopyFile(original string, src string) error
- func CreateNullFolder(catalog string) error
- func FileExists(filePath string) (bool, error)
- func FileMd5(path string) (string, error)
- func FileSize(path string) (int64, error)
- func FolderExists(path string, isCreate bool) (bool, error)
- func ReadFolder(path string, isRecursive bool) ([]string, error)
- func ValidateFileSign(localPath string, fileMd5 string, fileSize int64) error
- func WriterFile(path string, content []byte) error
- func WriterFileByAppend(path string, content []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCopySrcExists = errors.New("拷贝文件时目标文件存在") ErrCopyOriginalExists = errors.New("拷贝文件时源文件不存在") )
Functions ¶
func FolderExists ¶
检查一个文件夹是否存在 若不存在运行自行创建 @param path 文件夹路径 @param isCreate 若文件夹不存在,是否自动创建
func ReadFolder ¶
获取一个路径下的全部文件 @param path 读取路径 @param isRecursive 是否递归读取
func ValidateFileSign ¶
验证文件签名 @param localPath 本地路径 @param fileMd5 文件md5 @param fileSize 文件大小
func WriterFile ¶
向一个路径中写入文件 @param path 文件路径 @param content 文件内容
func WriterFileByAppend ¶
向一个路径中追加写入文件 @param path 文件路径 @param content 文件内容
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.