file

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2022 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package file 文件实用工具

Index

Constants

This section is empty.

Variables

View Source
var BOTPATH = Pwd()

BOTPATH BOT当前路径

Functions

func DownloadTo

func DownloadTo(url, file string, chkcrt bool) error

DownloadTo 下载到路径 nolint: bodyclose

func GetLazyData

func GetLazyData(path string, isDataMustEqual bool) ([]byte, error)

GetLazyData 获取懒加载数据 传入的 path 的前缀 data/ 在验证完 md5 后将被删去 以便进行下载

func IsExist

func IsExist(path string) bool

IsExist 文件/路径存在

func IsNotExist

func IsNotExist(path string) bool

IsNotExist 文件/路径不存在

func Pwd

func Pwd() (path string)

Pwd 获取当前路径

func Size added in v1.3.0

func Size(path string) (n int64)

Size 获取文件大小

Types

This section is empty.

Jump to

Keyboard shortcuts

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