file

package
v1.14.1 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Creator

type Creator interface {
	NewWriter(id, total int64, name, subPath string, format Format, size int64) (Writer, error)
}

func NewCreator

func NewCreator(rename bool, downloadPath string, formats []Format, extract bool) Creator

type Format added in v0.8.2

type Format string // The supported file extension.
const (
	EPUB Format = "epub"
	MOBI Format = "mobi"
	AZW  Format = "azw"
	AZW3 Format = "azw3"
	PDF  Format = "pdf"
	ZIP  Format = "zip"
)

func Extension added in v0.8.2

func Extension(filename string) (Format, bool)

func LinkExtension added in v0.8.2

func LinkExtension(link string) (Format, bool)

LinkExtension the file extension from the link.

func (Format) Archive added in v0.8.2

func (f Format) Archive() bool

The Archive will return if this format is an archive.

type Writer

type Writer interface {
	io.Writer
	io.Closer
	SetSize(int64)
}

Jump to

Keyboard shortcuts

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