MCPcopy Index your code
hub / github.com/Threadfin/Threadfin / createSystemFiles

Function createSystemFiles

src/system.go:53–90  ·  view source on GitHub ↗

Alle Systemdateien erstellen

()

Source from the content-addressed store, hash-verified

51
52// Alle Systemdateien erstellen
53func createSystemFiles() (err error) {
54 var debug string
55 for _, file := range SystemFiles {
56
57 var filename = getPlatformFile(System.Folder.Config + file)
58
59 err = checkFile(filename)
60 if err != nil {
61 // File does not exist, will be created now
62 err = saveMapToJSONFile(filename, make(map[string]interface{}))
63 if err != nil {
64 return
65 }
66
67 debug = fmt.Sprintf("Create File:%s", filename)
68 showDebug(debug, 1)
69
70 }
71
72 switch file {
73
74 case "authentication.json":
75 System.File.Authentication = filename
76 case "pms.json":
77 System.File.PMS = filename
78 case "settings.json":
79 System.File.Settings = filename
80 case "xepg.json":
81 System.File.XEPG = filename
82 case "urls.json":
83 System.File.URLS = filename
84
85 }
86
87 }
88
89 return
90}
91
92func updateUrlsJson() {
93

Callers 1

InitFunction · 0.85

Calls 4

checkFileFunction · 0.85
saveMapToJSONFileFunction · 0.85
showDebugFunction · 0.85
getPlatformFileFunction · 0.70

Tested by

no test coverage detected