MCPcopy Index your code
hub / github.com/labstack/echo / File

Method File

context.go:661–663  ·  view source on GitHub ↗

File sends a response with the content of the file. Avoid using the leading `/` slash as most of the Go standard library fs.FS implementations require relative paths for file operations.

(file string)

Source from the content-addressed store, hash-verified

659// Avoid using the leading `/` slash as most of the Go standard library fs.FS implementations require relative paths for
660// file operations.
661func (c *Context) File(file string) error {
662 return fsFile(c, file, c.echo.Filesystem)
663}
664
665// FileFS serves file from given file system.
666//

Callers 1

contentDispositionMethod · 0.95

Calls 1

fsFileFunction · 0.85

Tested by

no test coverage detected