billyhttp

package
v0.50.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BillyFs

type BillyFs interface {
	billy.Basic
	billy.Dir
}

BillyFs is the set of required billy filesystem interfaces.

type Dir

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

Dir implements the HTTP directory.

func NewDir

func NewDir(fs BillyFs, path string) *Dir

NewDir constructs the Dir from a Billy Dir.

func (*Dir) Close

func (f *Dir) Close() error

func (*Dir) Read

func (f *Dir) Read(p []byte) (n int, err error)

func (*Dir) Readdir

func (f *Dir) Readdir(count int) ([]fs.FileInfo, error)

Readdir reads the directory contents.

func (*Dir) Seek

func (f *Dir) Seek(offset int64, whence int) (int64, error)

func (*Dir) Stat

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

type File

type File struct {
	// File is the billy file
	billy.File
	// contains filtered or unexported fields
}

File implements the HTTP file.

func NewFile

func NewFile(fs BillyFs, path string) (*File, error)

NewFile constructs the File from a Billy File.

func (*File) Readdir

func (f *File) Readdir(count int) ([]fs.FileInfo, error)

func (*File) Stat

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

type FileSystem

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

FileSystem implements the HTTP filesystem.

func NewFileSystem

func NewFileSystem(fs BillyFs, prefix string) *FileSystem

NewFileSystem constructs the FileSystem from a Billy FileSystem.

Prefix is a path prefix to prepend to file paths for HTTP. The prefix is trimmed from the paths when opening files.

func (*FileSystem) Open

func (f *FileSystem) Open(name string) (http.File, error)

Open opens the file at the given path.

Jump to

Keyboard shortcuts

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