httpfs

package module
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2022 License: MIT Imports: 7 Imported by: 1

README

HttpFS

Go HTTP File System package that allows to restrict directory listing and instead check if a default index file is available to be served.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomFileSystem added in v1.0.1

type CustomFileSystem struct {
	http.FileSystem

	DefaultFile *file
	// contains filtered or unexported fields
}

func New added in v1.0.1

func New(root string, listdir bool, indexFile string) (*CustomFileSystem, error)

func (*CustomFileSystem) Exists added in v1.0.1

func (cfs *CustomFileSystem) Exists(prefix string, filepath string) bool

func (*CustomFileSystem) Open added in v1.0.1

func (cfs *CustomFileSystem) Open(name string) (http.File, error)

Open conforms to http.Filesystem.

type HttpFileSystem

type HttpFileSystem interface {
	http.FileSystem
	Exists(prefix string, path string) bool
}

Jump to

Keyboard shortcuts

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