lazyfile

package
v1.3.1-sp7 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LazyOpenReadCloserFile

func LazyOpenReadCloserFile(name string, flag int, perm os.FileMode) io.ReadCloser

Types

type FileInfo added in v1.3.2

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

func NewFileInfo added in v1.3.2

func NewFileInfo(name string, size int64, fileMode fs.FileMode) *FileInfo

func (*FileInfo) IsDir added in v1.3.2

func (f *FileInfo) IsDir() bool

func (*FileInfo) ModTime added in v1.3.2

func (f *FileInfo) ModTime() time.Time

func (*FileInfo) Mode added in v1.3.2

func (f *FileInfo) Mode() fs.FileMode

func (*FileInfo) Name added in v1.3.2

func (f *FileInfo) Name() string

func (*FileInfo) Size added in v1.3.2

func (f *FileInfo) Size() int64

func (*FileInfo) Sys added in v1.3.2

func (f *FileInfo) Sys() any

type LazyFile

type LazyFile struct {
	*os.File
	// contains filtered or unexported fields
}

func LazyOpenStreamByFile

func LazyOpenStreamByFile(rf *os.File) *LazyFile

func LazyOpenStreamByFilePath

func LazyOpenStreamByFilePath(name string) *LazyFile

func (*LazyFile) Close

func (f *LazyFile) Close() error

func (*LazyFile) Name

func (f *LazyFile) Name() string

func (*LazyFile) Read

func (f *LazyFile) Read(b []byte) (int, error)

func (*LazyFile) ReadAt

func (f *LazyFile) ReadAt(b []byte, off int64) (n int, err error)

func (*LazyFile) Stat

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

func (*LazyFile) Write

func (f *LazyFile) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

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