MCPcopy Create free account
hub / github.com/FloatTech/ZeroBot-Plugin-Playground / checkFile

Function checkFile

plugin/partygame/sessionAct.go:27–37  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

25var rlmu sync.RWMutex
26
27func checkFile(path string) {
28 rlmu.Lock()
29 defer rlmu.Unlock()
30 if _, err := os.Stat(path); os.IsNotExist(err) {
31 _, err := os.Create(path)
32 if err != nil {
33 return
34 }
35 }
36 dataPath = path
37}
38
39func saveItem(dataPath string, info Session) {
40 interact := loadSessions(dataPath)

Callers 1

initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected