MCPcopy Create free account
hub / github.com/GoMudEngine/GoMud / ReadFile

Method ReadFile

internal/plugins/plugins.go:228–240  ·  view source on GitHub ↗

Reads the first available file found in a plugin and uses it. This means only one plugin wins!

(name string)

Source from the content-addressed store, hash-verified

226// Reads the first available file found in a plugin and uses it.
227// This means only one plugin wins!
228func (p pluginRegistry) ReadFile(name string) ([]byte, error) {
229 for _, p := range registry {
230
231 if embedPath, ok := p.files.filePaths[name]; ok {
232 b, err := p.files.fileSystem.ReadFile(embedPath)
233 if err == nil {
234 return b, nil
235 }
236 }
237 }
238
239 return nil, fs.ErrNotExist
240}
241
242func (p pluginRegistry) Open(name string) (fs.File, error) {
243

Callers 15

initFunction · 0.45
SearchOfflineUsersFunction · 0.45
ValidateMethod · 0.45
readFileFunction · 0.45
LoadAliasesFunction · 0.45
ListPanelLayoutsFunction · 0.45
LoadPanelLayoutFunction · 0.45
RenameZoneForAdminFunction · 0.45
loadItemFileFromFSFunction · 0.45
extractCombatCommentsFunction · 0.45
loadMutatorFileFromFSFunction · 0.45
WebRequestMethod · 0.45

Calls

no outgoing calls