MCPcopy
hub / github.com/gin-gonic/gin / Open

Method Open

fs.go:18–25  ·  view source on GitHub ↗

Open passes `Open` to the upstream implementation without `Readdir` functionality.

(name string)

Source from the content-addressed store, hash-verified

16
17// Open passes `Open` to the upstream implementation without `Readdir` functionality.
18func (o OnlyFilesFS) Open(name string) (http.File, error) {
19 f, err := o.FileSystem.Open(name)
20 if err != nil {
21 return nil, err
22 }
23
24 return neutralizedReaddirFile{f}, nil
25}
26
27// neutralizedReaddirFile wraps http.File with a specific implementation of `Readdir`.
28type neutralizedReaddirFile struct {

Callers 9

TestOnlyFilesFS_OpenFunction · 0.95
TestOnlyFilesFS_Open_errFunction · 0.95
readNthLineFunction · 0.45
createStaticHandlerMethod · 0.45
SaveUploadedFileMethod · 0.45

Calls

no outgoing calls