indexeddb

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: Apache-2.0 Imports: 13 Imported by: 11

Documentation

Rendered for js/wasm

Overview

Package indexeddb contains a WebAssembly compatible file system. Uses IndexedDB under the hood.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

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

FS is a browser-based file system, storing files and metadata inside IndexedDB.

func NewFS

func NewFS(ctx context.Context, name string, options Options) (*FS, error)

NewFS returns a new FS.

func (*FS) Chmod

func (fs *FS) Chmod(name string, mode hackpadfs.FileMode) error

Chmod implements hackpadfs.ChmodFS

func (*FS) Chtimes

func (fs *FS) Chtimes(name string, atime time.Time, mtime time.Time) error

Chtimes implements hackpadfs.ChtimesFS

func (*FS) Clear

func (fs *FS) Clear(ctx context.Context) error

Clear dangerously destroys all data inside this FS. Use with caution.

func (*FS) Mkdir

func (fs *FS) Mkdir(name string, perm hackpadfs.FileMode) error

Mkdir implements hackpadfs.MkdirFS

func (*FS) MkdirAll

func (fs *FS) MkdirAll(path string, perm hackpadfs.FileMode) error

MkdirAll implements hackpadfs.MkdirAllFS

func (*FS) Open

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

Open implements hackpadfs.FS

func (*FS) OpenFile

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

OpenFile implements hackpadfs.OpenFileFS

func (*FS) Remove

func (fs *FS) Remove(name string) error

Remove implements hackpadfs.RemoveFS

func (*FS) Rename

func (fs *FS) Rename(oldname, newname string) error

Rename implements hackpadfs.RenameFS

func (*FS) Stat

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

Stat implements hackpadfs.StatFS

type Options

type Options struct {
	Factory               *idb.Factory
	TransactionDurability idb.TransactionDurability
}

Options provides configuration options for a new FS.

Directories

Path Synopsis
Package idbblob contains a JavaScript implementation of blob.Blob.
Package idbblob contains a JavaScript implementation of blob.Blob.

Jump to

Keyboard shortcuts

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