Documentation ¶
Overview ¶
httpfs is a read-only filesystem built on top of HTTP
Index ¶
- func FileServer(fsys fs.FS) http.Handler
- type FS
- func (fsys *FS) Open(name string) (fs.File, error)
- func (fsys *FS) OpenFile(name string, flag int, perm fs.FileMode) (fs.File, error)
- func (fsys *FS) ReadDir(name string) ([]fs.DirEntry, error)
- func (fsys *FS) Stat(name string) (fs.FileInfo, error)
- func (fsys *FS) Watch(name string, cfg *watchfs.Config) (*watchfs.Watch, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileServer ¶
FileServer wraps http.FileServer with extra endpoints for metadata. Requests to dir paths with `?readdir` will a return JSON array of dir entries. Requests to paths with `?stat` will return a JSON object of file info. Requests to paths with `?watch` will stream file change events.
Types ¶
Click to show internal directories.
Click to hide internal directories.