modweb/utils/realfs.go

17 lines
199 B
Go
Raw Normal View History

package utils
import (
"net/http"
"os"
"path"
)
type RealFS struct {
Path string
}
func (fs RealFS) Open(filename string) (http.File, error) {
return os.Open(path.Join(fs.Path, filename))
}