Open passes `Open` to the upstream implementation without `Readdir` functionality.
(name string)
| 16 | |
| 17 | // Open passes `Open` to the upstream implementation without `Readdir` functionality. |
| 18 | func (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`. |
| 28 | type neutralizedReaddirFile struct { |
no outgoing calls