FileFS registers a new route with path to serve file from the provided file system. Avoid using the leading `/` slash as most of the Go standard library fs.FS implementations require relative paths for file operations.
(path, file string, filesystem fs.FS, m ...MiddlewareFunc)
| 660 | // Avoid using the leading `/` slash as most of the Go standard library fs.FS implementations require relative paths for |
| 661 | // file operations. |
| 662 | func (e *Echo) FileFS(path, file string, filesystem fs.FS, m ...MiddlewareFunc) RouteInfo { |
| 663 | return e.GET(path, StaticFileHandler(file, filesystem), m...) |
| 664 | } |
| 665 | |
| 666 | // StaticFileHandler creates handler function to serve file from provided file system. |
| 667 | // |