* fileserver: Support virtual file systems (close #3720) This change replaces the hard-coded use of os.Open() and os.Stat() with the use of the new (Go 1.16) io/fs APIs, enabling virtual file systems. It introduces a new module namespace, caddy.fs, for such file systems. Also improve documentation for the file server. I realized it was one of the first modules written for Caddy 2, and the docs hadn't really been updated since! * Virtualize FS for file matcher; minor tweaks * Fix tests and rename dirFS -> osFS (Since we do not use a root directory, it is dynamic.) |
||
|---|---|---|
| .. | ||
| testdata | ||
| browse.go | ||
| browse.html | ||
| browsetplcontext.go | ||
| browsetplcontext_test.go | ||
| caddyfile.go | ||
| command.go | ||
| matcher.go | ||
| matcher_test.go | ||
| staticfiles.go | ||
| staticfiles_test.go | ||