mmap

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2023 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeTagger added in v1.4.0

func MakeTagger(fpath string) (wpk.Tagger, error)

MakeTagger creates Tagger object to get access to package nested files.

Types

type MappedFile

type MappedFile struct {
	wpk.PkgReader

	mm.MMap
	// contains filtered or unexported fields
}

MappedFile structure gives access to nested into package file by memory mapping. wpk.RFile interface implementation.

func NewMappedFile added in v1.2.0

func NewMappedFile(fwpk *os.File, ts wpk.TagsetRaw) (f *MappedFile, err error)

NewMappedFile maps nested to package file based on given tags slice.

func (*MappedFile) Close

func (f *MappedFile) Close() error

Close unmaps memory and closes mapped memory handle.

func (*MappedFile) Stat added in v1.2.0

func (f *MappedFile) Stat() (fs.FileInfo, error)

Stat is for fs.File interface compatibility.

type Tagger added in v1.4.0

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

Tagger is object to get access to package nested files by memory mapping of wpk-file.

func (*Tagger) Close added in v1.4.0

func (tgr *Tagger) Close() error

Close file handle. This function must be called only for root object, not subdirectories. It has no effect otherwise. io.Closer implementation.

func (*Tagger) OpenTagset added in v1.4.0

func (tgr *Tagger) OpenTagset(ts wpk.TagsetRaw) (wpk.RFile, error)

OpenTagset creates file object to give access to nested into package file by given tagset.

Jump to

Keyboard shortcuts

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