MCPcopy Create free account
hub / github.com/QuantumNous/new-api / Open

Method Open

common/embed-file-system.go:26–33  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

24}
25
26func (e *embedFileSystem) Open(name string) (http.File, error) {
27 if name == "/" {
28 // This will make sure the index page goes to NoRouter handler,
29 // which will use the replaced index bytes with analytic codes.
30 return nil, os.ErrNotExist
31 }
32 return e.FileSystem.Open(name)
33}
34
35func EmbedFolder(fsEmbed embed.FS, targetPath string) static.ServeFileSystem {
36 efs, err := fs.Sub(fsEmbed, targetPath)

Callers 15

ExistsMethod · 0.95
TestMainFunction · 0.45
EstimateRequestTokenFunction · 0.45
newAuthzTestDBFunction · 0.45
TestMainFunction · 0.45
chooseDBFunction · 0.45
OpenMethod · 0.45

Calls

no outgoing calls

Tested by 9

TestMainFunction · 0.36
newAuthzTestDBFunction · 0.36
TestMainFunction · 0.36