MCPcopy Create free account
hub / github.com/kataras/iris / Open

Method Open

aliases.go:327–338  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

325}
326
327func (p *prefixedDir) Open(name string) (http.File, error) {
328 destPath, _, ok, err := context.SafeFilename(p.prefix, name)
329 if err != nil {
330 return nil, err
331 }
332 if !ok {
333 return nil, http.ErrMissingFile // unsafe.
334 }
335
336 // name = path.Join(destPath, filename)
337 return p.fs.Open(destPath)
338}
339
340type partyConfiguratorMiddleware struct {
341 handlers []Handler

Callers

nothing calls this directly

Calls 1

SafeFilenameFunction · 0.92

Tested by

no test coverage detected