MCPcopy Index your code
hub / github.com/coder/coder / target

Method target

coderd/files/overlay.go:30–39  ·  view source on GitHub ↗
(p string)

Source from the content-addressed store, hash-verified

28}
29
30func (f overlayFS) target(p string) fs.FS {
31 target := f.baseFS
32 for _, overlay := range f.overlays {
33 if strings.HasPrefix(path.Clean(p), overlay.Path) {
34 target = overlay.FS
35 break
36 }
37 }
38 return target
39}
40
41func (f overlayFS) Open(p string) (fs.File, error) {
42 return f.target(p).Open(p)

Callers 3

OpenMethod · 0.95
ReadDirMethod · 0.95
ReadFileMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected