filetool

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2022 License: GPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadTo

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

DownloadTo 下载到路径

func Findfile

func Findfile(path string, name string, filemap map[string][]*zip.File) (io.ReadCloser, bool, error)

查找map中的文件 并打开

func IsExist

func IsExist(path string) bool

IsExist 文件/路径存在

func LoadFontFaces

func LoadFontFaces(dc *gg.Context, points float64, path string, name string, filemap map[string][]*zip.File) error

打开map中的ttf文件

func Parsezip

func Parsezip(zipFile string, filemap map[string][]*zip.File) error

加载 zip 文件 到 map

Types

type Files

type Files struct {
	Name     string // 文件完整路径
	NameOnly string // 文件完整路径(不带后缀)
	Path     string // 路径(不带文件名)
	FileName string // 完整文件名(不带路径)
	Suffix   string // 文件的后缀(文件类型)
}

func Readir

func Readir(dir, suffix string) ([]Files, int, error)

获取指定文件夹指定后缀文件的 绝对/相对 路径

Jump to

Keyboard shortcuts

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