Documentation
¶
Index ¶
- type FS
- func (FS) CaddyModule() caddy.ModuleInfo
- func (fsys *FS) Open(name string) (fs.File, error)
- func (fs *FS) Provision(ctx caddy.Context) error
- func (fsys *FS) ReadDir(name string) ([]fs.DirEntry, error)
- func (fsys *FS) Stat(name string) (fs.FileInfo, error)
- func (fs *FS) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FS ¶
type FS struct {
// Root is the path to the directory containing the archives and other files
// exposed by this filesystem. If empty, the current working directory is used.
Root string `json:"root_path,omitempty"`
// contains filtered or unexported fields
}
FS is a Caddy virtual filesystem module for handling archive files.
## Caddyfile example
```caddy
{
filesystem archive_files archives {
root /srv/data
}
}
example.com {
file_server browse {
fs archive_files
}
}
```
func (FS) CaddyModule ¶
func (FS) CaddyModule() caddy.ModuleInfo
func (*FS) Open ¶ added in v1.0.3
Open opens name and adapts the result to the additional file contracts used by Caddy's file server. In particular, regular files must be seekable and directory listings must go through DeepFS so archives appear as directories.
func (*FS) ReadDir ¶ added in v1.0.3
ReadDir returns directory entries with archives represented as directories.
Click to show internal directories.
Click to hide internal directories.