dl

package
v0.0.0-...-4cb4b50 Latest Latest
Warning

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

Go to latest
Published: May 20, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Rendered for js/wasm

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Download

func Download(data []byte, filename string) error

Types

type FS

type FS struct {
	// contains filtered or unexported fields
}

FS is a virtual filesystem that triggers browser downloads on file close. Files written to this filesystem don't persist - instead, when closed, their contents are downloaded in the browser with the filename.

func New

func New() *FS

New creates a new download filesystem.

func (*FS) Create

func (fsys *FS) Create(name string) (fs.File, error)

func (*FS) Open

func (fsys *FS) Open(name string) (fs.File, error)

func (*FS) OpenFile

func (fsys *FS) OpenFile(name string, flag int, perm fs.FileMode) (fs.File, error)

func (*FS) Stat

func (fsys *FS) Stat(name string) (fs.FileInfo, error)

Jump to

Keyboard shortcuts

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