fshook

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package fshook 支持修改修改 FS 中指定文件内容

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileHook

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

func NewFileHook

func NewFileHook(i fs.File, inject func(body []byte) []byte) *FileHook

func (*FileHook) Close

func (f *FileHook) Close() error

func (*FileHook) Read

func (f *FileHook) Read(ibytes []byte) (int, error)

func (*FileHook) Stat

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

type FileInfoHook

type FileInfoHook struct {
	fs.FileInfo
	// contains filtered or unexported fields
}

func (*FileInfoHook) Size

func (f *FileInfoHook) Size() int64

type FsHook

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

func NewFsHook

func NewFsHook(i fs.FS, inject map[string]func(body []byte) []byte) *FsHook

func (*FsHook) Open

func (f *FsHook) Open(name string) (fs.File, error)

Jump to

Keyboard shortcuts

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