MCPcopy Create free account
hub / github.com/MertJSX/folderhost / sendFullContent

Function sendFullContent

middleware/websocket/file_watcher.go:98–111  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

96}
97
98func sendFullContent(path string) {
99 content, err := os.ReadFile(path)
100 if err != nil {
101 return
102 }
103
104 msg, _ := json.Marshal(fiber.Map{
105 "type": "full-content-update",
106 "content": string(content),
107 "timestamp": time.Now().Unix(),
108 })
109
110 utils.SendToAll(path, websocket.TextMessage, msg)
111}
112
113func sendReloadNotification(path string) {
114 msg, _ := json.Marshal(fiber.Map{

Callers 1

onFileChangedFunction · 0.85

Calls 1

SendToAllFunction · 0.92

Tested by

no test coverage detected