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

Function filePath

site/site.go:238–243  ·  view source on GitHub ↗

filePath returns the filepath of the requested file.

(p string)

Source from the content-addressed store, hash-verified

236
237// filePath returns the filepath of the requested file.
238func filePath(p string) string {
239 if !strings.HasPrefix(p, "/") {
240 p = "/" + p
241 }
242 return strings.TrimPrefix(path.Clean(p), "/")
243}
244
245func (h *Handler) exists(filePath string) bool {
246 f, err := h.opts.SiteFS.Open(filePath)

Callers 2

ServeHTTPMethod · 0.85
ServeHTTPMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected